Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I use NEXTVAL in stored procedure??
select GLMT_LOG_SEQ.NEXTVAL into pLOG_ID FROM DUAL
should be good
Paul-Marc
Dan Gibbons a écrit dans le message <74ivo0$pg31_at_pound.sebank.se>...
>Hi,
>
>I've just started to use Oracle and I'm trying to assign NEXTVAL to a
>variable in a strored procedure which I then want to use in an insert
>statement and return the new number via an output parameter. When I try
and
>save the stored procedure I get "Can't use sequence in this context". This
>is the offending line:-
>
>pLOG_ID := GLMT_LOG_SEQ.NEXTVAL;
>
>Does anyone know how I can create a stored procedure that will assign
>NEXTVAL to a tables ID field and return the ID that it used?
>
>Thanks in advance.
>
>Dan
>
>
>
>
>
Received on Tue Dec 08 1998 - 07:43:59 CST
![]() |
![]() |