Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Exhaused sequence

RE: Exhaused sequence

From: Knight, Jon <jknight_at_concordefs.com>
Date: Thu, 17 Feb 2005 16:20:20 -0600
Message-ID: <17ECCBDCF27C544583F2CAD928F953260221FB1D@memex1.corp.cefs.int>


Thanks for the suggestion. I should have mentioned that it's a client's account number. So, the existing ones have to stay the same.

Thanks,
Jon Knight

 -----Original Message-----

From: 	Davey, Alan [mailto:ddavey_at_harris.com] 
Sent:	Thursday, February 17, 2005 4:15 PM
To:	jknight_at_concordefs.com
Subject:	RE: Exhaused sequence

When you say that they don't care what the value is, does that mean if the current value is say '000666', you can modify it to something else like '000777'?

If so, then update all the record values sequentially starting at '000001' through '0nnnnn'. Then reset your counter to the max value plus one.



Alan Davey
Sr. Programmer/Analyst, Advertising Solutions Oracle 9i OCA; 3/4 OCP
Harris Corporation
212.295.3458

> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Knight, Jon
> Sent: Thursday, February 17, 2005 4:55 PM
> To: 'Oracle-L_at_freelists.org'
> Subject: Exhaused sequence
>
> We have a sequence that is about to reach it's maximum
> value (999999).
> Ordinarly, I would just expand the column and let it keep
> going, but it populates a business column. They don't care
> what the value is, as long as it's unique and no longer than
> 6 digits. Of course, like many sequence populated columns,
> it's not consecutive.
>
> I'd like to go back and fill in those "gaps" while the
> business users decide what they want to do. So, I'm
> thinking: reset the sequence to zero & create a function that
> calls nextval until it finds one that's available.
> Besides a performance hit, are there any other gotchas I'm missing?
> Scalability?
>
> Has anyone done something similar before?
>
> Thanks,
> Jon Knight
> --
> http://www.freelists.org/webpage/oracle-l
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 17 2005 - 17:24:04 CST

Original text of this message

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