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

Home -> Community -> Usenet -> c.d.o.server -> Re: Reseting a sequence number to value less than current last_number

Re: Reseting a sequence number to value less than current last_number

From: Andy Hardy <junkmail_at_[127.0.0.1>
Date: Fri, 25 Apr 2003 19:12:41 +0100
Message-ID: <KyH3mcEZqXq+EwiX@hardyfamily.plus.com>


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: 0xA62A4849
Received on Fri Apr 25 2003 - 13:12:41 CDT

Original text of this message

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