Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to convert "Begin Atomic" in Sybase to Oracle !!!

Re: How to convert "Begin Atomic" in Sybase to Oracle !!!

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: Fri, 20 Jul 2001 14:38:27 GMT
Message-ID: <3B586C67.61F6BAC3@magicinterface.com>

First a little side note: this really is off topic in ...oracle.marketplace, so I also cross-posted to  com.databases.oracle.misc

You can assign the ID using a sequence and a trigger on insert to that table. Then this procedure will remain relatively the same.

If you are assumimg the MAX(ID) is the ID of the row inserted here, you might be better off doing as Mike Shoop suggested and adding the Sequence value to the INSERT in this routine.

Ed Prochak

CME wrote:
>
> HI:
>
> Would you like to tell me how i can convert the following case in Sybase
> format to Oracle?
>
> ---------------------------------------------------------------
> create or replace procedure
> bbc.AddNewIdentInformed(sDateDone in date,sPerson in long,sDoneBy in
> long,sNotes in long,sIdentID in number,sID out number)
> begin atomic
> insert into IdentInformed(IdentID,DateDone,Person,DoneBy,Notes) values(
> sIdentID,sDateDone,sPerson,sDoneBy,sNotes);
> select MAX(ID) into sID from IdentInformed;
> end;
> /
> -------------------------------------------------------------
>
> Thanks!
Received on Fri Jul 20 2001 - 09:38:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US