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 -> Weird SEQUENCE Problem

Weird SEQUENCE Problem

From: TJ <tjgrant2_at_yahoo.com>
Date: 1 Mar 2007 07:40:38 -0800
Message-ID: <1172763638.205827.70800@k78g2000cwa.googlegroups.com>


I have a sequence that is defined correctly. According to TOAD, the Last Value generated by the sequence is '21'.

However, when I execute:

SELECT MY_SEQUENCE.NEXTVAL FROM DUAL; The value is '1'. If I do it again, then the value is '2'. Obviously, I can continue to do this until I get the number I want, but why is NEXTVAL returning me the wrong number?

One thing that may help... I believe that the sequence is resetting to '1' when we bring the DB down and restart it. I haven't proven this yet, but this has been a problem that recurs intermittently and that is my theory at this point.

Thanks.

TJ Received on Thu Mar 01 2007 - 09:40:38 CST

Original text of this message

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