
October 5th, 2004, 03:32 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Time-Based Trigger - Reset a Sequence at a certain time
Here's my problem:
Sequence from 1 to ~
Create a unique identifier by:
Code:
select sysdate || 'X' || EXAMPLESEQUENCE.nextval from sys.dual
But then I want to reset the sequence to 1 on Jan 1st (or some other time)every year.
Or if possible, how about more flexibility on when the sequence reset is triggered (in case I modify the unique identifier to monthly, weekly)?
How do I go about creating a time-driven trigger rather than a data-driven trigger or event-driven trigger?
Thanks for your help.
|