How to (MyVariable := MySequence.currval)

From: Greg <actiris_at_loxinfo.co.th>
Date: 2000/06/28
Message-ID: <395981F0.71B072D9_at_loxinfo.co.th>#1/1


[Quoted] [Quoted] Need to save the current value of a sequence in a variable to use it later.

declare
MyVariable number;

MyVariable := MySequence.currval;

does not work

PLS-00357: Table,View Or Sequence reference 'BGV.SEQ_NAME_ID.CURRVAL' not allowed in this context



The help on PLS-00357
PLS-00357 Table,View Or Sequence reference 'string' not allowed in this context
Cause: A reference to database table, view, or sequence was found in an inappropriate context. Such references can appear only in SQL statements or (excluding sequences)
 in %TYPE and %ROWTYPE declarations. Some valid examples follow:

I guess the declare is wrong.....
How to do that
Thanks Greg Received on Wed Jun 28 2000 - 00:00:00 CEST

Original text of this message