-
We have a requirement to allow the user to enter the amount of time before a record should be automatically deleted. I can record the date and time the record is created, and capture in a numeric field the amount of time (in minutes) before the record should be deleted, then I can add this to the creation date/time and determine the date and time at which the record should be deleted.
However, there is another requirement to display beside each record (on the web site) the amount of time remaining prior to auto-deletion.
My question then is how to update a field representing time_remaining via a trigger. On which event should this trigger be based?
Thanks,
-
I don't understand why you want to store the time remaining before auto deletion. Why don't you just calculate it as part of the query to retreive the row?
Something like:
select (time_stored + deletion_interval) - sysdate from table;
-
I do not know what platform the web front end is using but, you can do this kind of thing using TIMER in SQL*Forms.
svk
-
you can user DBMS_JOBS to execute an update procedure every n time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|