Title: Trigger or ????
Create a stored procedure that resets your sequence number, and then run that procedure at the necessary time each night using dbms_job to schedule it.  Look into the Supplied Packages Reference for your version of the database for specifics on usage of the dbms_job package.
 
_YEX_
<)))><
-----Original Message-----
From: Burton, Laura L. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 10:58 AM
To: Multiple recipients of list ORACLE-L
Subject: Trigger or ????

I have a need to reset a sequence number at 00:01 everyday.  I thought about creating a trigger to check the time, but thought that there might be a better way than checking the time every time a record is being added.  I also thought about checking the max date on the table and comparing against the system date.  When system date > max then reset the sequence number.  I like this logic better and thought of holes with using the time. 

The only problem I have is that this seems like a lot of overhead every time I add a record, which will be often.  Is a trigger the only method available to me?

Thanks,

Laura

Reply via email to