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: Automatically reset Sequence to initial value?

Re: Automatically reset Sequence to initial value?

From: Claus Jensen <cje_at_stibo.com>
Date: 1997/10/17
Message-ID: <3447D276.4B1C@stibo.com>#1/1

Todd Owers wrote:

> I want to have a sequence automatically reset to its initial value (i.e.,
> its START WITH parameter) on January 1, 1998 at 12:01 a.m., and the first
> of every year thereafter.
>
> I know it is possible to manually type ALTER SEQUENCE statements to
> accomplish this, but is there a way to do it automatically?

You should be able to do it with dbms_job "the Oracle variant of cron". BTW, you can't reset it to it's initial value by "alter sequence ...". You must drop it and recreate it again, unless this has changed from 7.1.x (which I'm currently stuck on).

Best wishes
Claus Jensen Received on Fri Oct 17 1997 - 00:00:00 CDT

Original text of this message

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