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: User Sequence Skipping Numbers???

Re: User Sequence Skipping Numbers???

From: Rich Goldkamp <rich_goldkamp_at_my-dejanews.com>
Date: Tue, 06 Apr 1999 14:10:30 GMT
Message-ID: <7ed4kg$u5n$1@nnrp1.dejanews.com>


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 Own    
Received on Tue Apr 06 1999 - 09:10:30 CDT

Original text of this message

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