QUESTION ON SEQUENCE VALUES - 9iR2

Discussion in 'UK Motorcycles' started by Jeremy, Aug 9, 2007.

  1. Jeremy

    Jeremy Guest

    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, Aug 9, 2007
    #1
    1. Advertisements

  2. Jeremy

    Jeremy Guest

    Oops. Wrong group.
     
    Jeremy, Aug 9, 2007
    #2
    1. Advertisements

  3. Jeremy

    Roger Hunt Guest

    Jeremy wrote
    Certainly - I'm thinking of going out to buy an ice cream, if that
    helps.
     
    Roger Hunt, Aug 9, 2007
    #3
  4. You need to get out more.
     
    steve auvache, Aug 9, 2007
    #4
  5. Sorry, I'm not really into Pokemon.
     
    Brownz \(Mobile\), Aug 9, 2007
    #5
  6. Jeremy

    zymurgy Guest

    Lol, YTC. Almost as bad as me, as I thought it was a thread about
    Valve Sequence :)

    Should'a known better ..

    P.
     
    zymurgy, Aug 9, 2007
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.