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

Home -> Community -> Usenet -> c.d.o.server -> Re: current sequence value - does not alway work

Re: current sequence value - does not alway work

From: Douglas Whitacre <whitacre_at_imake.com>
Date: Thu, 14 Jan 1999 10:01:10 -0500
Message-ID: <77l0s0$ps9@world1.bellatlantic.net>


Using CurrVal will only return a value for your current session. If you go into SQL*PLUS and select CurrVal from any index you'll get an error message. Keep at in mind. However, the first time you select NextVal, you have access to CurrVal.

Van Messner wrote in message <7S8n2.150$aE6.1034_at_news6.ispnews.com>...
>sequence.CurrVal
>
>
>Erik Forkalsrud wrote in message <369D04F2.973C5399_at_acim.com>...
>>
>>Hi,
>>
>>I'm a newbie when it comes to Oracle, and I'm trying to move
>>an MS SQL based application to Oracle 8.
>>
>>The MS SQL application uses the construct:
>> INSERT INTO table_with_identity_column
>> SELECT @@Identity
>>
>>I have figured out how to create a sequence object and a
>>trigger to insert sequential values, but I haven't figured
>>out how to retrieve the current value of a sequence object.
>>Do sequence objects have other methods than mysequence.nextval
>>(something like mysecquence.currentval) that I can use?
>>
>>Suggestions are appreciated.
>>
>>Erik Forkalsrud
>>
>
>
Received on Thu Jan 14 1999 - 09:01:10 CST

Original text of this message

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