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 -> Re: SEQUENCE/TRIGGER Problem

Re: SEQUENCE/TRIGGER Problem

From: Keith Jamieson <pdkj02_at_email.mot.com>
Date: Thu, 04 Feb 1999 07:44:24 +0000
Message-ID: <36B94FD8.6A9ADC31@email.mot.com>


This is caused by selecting the next_val from the sequence, but not using
it. eg if your program selects from a sequence but then aborts/rollsback
for whatever reason, the sequence will not rollback. This is normal behaviour.
You could try selecting the cur_value and updating your field with (cur_value
+ 1).  

Chris Capson wrote:

I am using a sequence In conjunction with a trigger to create an autonumber
field everything seems be working fine except for every once and a while
when I insert a record the sequence seems to jump over numbers in the
sequence.

Example:

The sequence creates 1,2,3,4,5,10,11,12,21.

Does anybody know what Might be causing this??

Thanks
Chris Capson

  Received on Thu Feb 04 1999 - 01:44:24 CST

Original text of this message

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