I could do a max(sequence) after the insert, but that’s risky in that if you are not inside a transaction it may bring back the wrong value (assuming someone else is entering a record the same time you are)

 

Thanks

 

Tom Schreck

972-361-9943


From: Knipp, Eric [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 10:04 AM
To: '[email protected]'
Subject: RE: ORACLE Sequence

 

Couldn't you just select max(sequence_field) after the insert?  Or are you talking about doing this in one shot, where no select is required.

-----Original Message-----
From: Schreck, Tom [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 9:59 AM
To: [email protected]
Subject: OT: ORACLE Sequence

Is there a way to query what the next sequence number will be?  In SQL Server, you can use @@Identity to retrieve the newly inserted record's identity value.  In ORACLE, they use sequences.  I need to know the value of the sequence so I can return it after inserting a record.

 

 

Thanks

 

Tom Schreck

Applications Developer

Dresser, Inc.

15455 Dallas Parkway, Suite 1100

Addison, TX  75001-4690

972-361-9943

[EMAIL PROTECTED]

 

 

 

 


CONFIDENTIALITY NOTICE: The information contained in this e-mail and attached document(s) may contain confidential information that is intended only for the addressee(s). If you are not the intended recipient, you are hereby advised that any disclosure, copying, distribution or the taking of any action in reliance upon the information is prohibited. If you have received this e-mail in error, please immediately notify the sender and delete it from your system.

<<attachment: image001.jpg>>

Reply via email to