Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Reseting a sequence number to value less than current last_number
In message <3ea93b37.48123183_at_nntp.mindspring.com> , James Williams
<willjamu_at_mindspring.com> writes
>I have a bunch of sequnce numbers to reset. I would rather not drop
>and recreate them to have to do grants and recompiles.
>
>I am trying to get the below program that I wrote to work. Maybe
>someone can enlighten me on my flaw. The last number never changes.
>
>Forgive the spaghetti code!
There's a lot of it!
From a quick peek I didn't notice you actually do a 'nextval' for the sequence - until you do that the sequence number will remain unchanged.
Have a look at the asktom.oracle.com site - Tom has a sequence reset routine there.
Andy
-- Andy Hardy. PGP ID: 0xA62A4849Received on Fri Apr 25 2003 - 13:12:41 CDT