Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: User Sequence Skipping Numbers???
In article <3706C94C.3270E745_at_nospam.blazenet.net>,
Michael Myers <mjmyers_at_nospam.blazenet.net> wrote:
> > I have set up a new production application that uses user sequences
> > for the work/job numbers. The groups that use these need to use all of
> > the job numbers and are very concerned when the job numbers jump/skip
> > for no apparent reason.
>
> One way to cut down on skipping is to apply the sequence number when the
> application performs the insert. If your application posts the data as
> the job is created, this might not work. But if your application allows
> the user to enter the information, then posts and commits when the user
> is finished, you could apply the sequence at insert time [INSERT INTO
> TABLE VALUES (JOB_SEQ.NEXTVAL, ITEM1, ITEM2, ...); COMMIT;]
>
> The disadvantage to this is that the user cannot reference the job
> number until after the job has been committed to the database.
>
Actually, this is not a problem. You can reference JOB_SEQ.CURRVAL after the insert to get the current value of the sequence.
Rich Goldkamp, Consultant, OCP RJGoldka_at_dcss.com Digital Consulting & Software Services (504) 523-5005 x2736 -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your OwnReceived on Tue Apr 06 1999 - 09:10:30 CDT
![]() |
![]() |