DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Trigger to be based on which event?

  1. #1
    Join Date
    Nov 2000
    Posts
    1

    Question

    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,


  2. #2
    Join Date
    Oct 2000
    Posts
    3
    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;

  3. #3
    Join Date
    Jul 2000
    Posts
    521
    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

  4. #4
    Join Date
    Aug 2000
    Location
    Ny
    Posts
    105
    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
  •  


Click Here to Expand Forum to Full Width