Re: Sqlplus question
From: Alan D. Mills <alanmNOSPAM_at_uk.europe.mcd.mot.com>
Date: Wed, 17 Jun 1998 15:41:00 +0100
Message-ID: <6m8kh3$8hk$1_at_schbbs.mot.com>
Date: Wed, 17 Jun 1998 15:41:00 +0100
Message-ID: <6m8kh3$8hk$1_at_schbbs.mot.com>
You could SELECT MySequence.NEXTVAL in the first query and then reference MySequence.CURRVAL in the next.
It's not perfect but might get you along.
or inserting the value into a temporary table and then joining to it in your subsequent queries
-- Alan D. Mills To email remove NOSPAM from address. Phill Weiss wrote in message <6m68f5$1ij$1_at_trotsky.cig.mot.com>...Received on Wed Jun 17 1998 - 16:41:00 CEST
>Is it possible to make a sqlplus query for the nextval of a sequence in one
>query, store the result in a variable, and use the variable in a subsequent
>sqlplus query? I don't want to have to use pl/sql to do this, only sqlplus.
>If this is possible, please enlighten me as to how I can go about it.
Thanks.
>