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 -> QUESTION ON SEQUENCE VALUES - 9iR2

QUESTION ON SEQUENCE VALUES - 9iR2

From: Jeremy <jeremy0505_at_gmail.com>
Date: Thu, 9 Aug 2007 18:45:32 +0100
Message-ID: <MPG.2125630b2fccde2b98a48b@news.individual.net>


Web based app (using mod_plsql)

At the start of processing, an activity ID is retrieved from a sequence:

select act_s.nextval
into l_act_id
from dual;

This value is then used as part of an insert statement to log the start of a procedure's execution.

At the end, this code is executed:

select act_s.currval
into l_act_id
from dual;

and then an update statement is executed to update the row whose pk is l_act_id.

The question is this: are there *any* circumstances (that anyone has heard of or come across) where the value returned by the 2nd select would not be the same value as returned by the first?

This is the same sessionid and, as far as I know, the package state (all packages used) is automatically reset at the end of each execution.

Appreciate any thoughts

-- 
jeremy
Received on Thu Aug 09 2007 - 12:45:32 CDT

Original text of this message

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