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

Home -> Community -> Usenet -> c.d.o.misc -> How to: retrieve Sequence.NEXTVAL to a variable?

How to: retrieve Sequence.NEXTVAL to a variable?

From: Hugh Pendry <hpendry_at_trinitech.co.uk>
Date: Fri, 13 Nov 1998 11:18:56 -0000
Message-ID: <72h4mt$7m0$1@trinitech.demon.co.uk>


Does anyone know how to retrieve the next value (or current value) a sequence into a variable in a stored procedure. I have tried various things including:-

function x
(

...

)
return ...
is

    MyVar integer
begin

    select MySequence.nextVal into MyVar;
...

end;

But have had no luck getting anything to work.

Thanks in advance
hugh. Received on Fri Nov 13 1998 - 05:18:56 CST

Original text of this message

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