-
Hi All,
One of my developers has asked me to come up with a way to delete rows based on a timestamp. He wants the row to be deleted after 48 hours. I was thinking a stored procedure with DBMS_JOB running it at certain intervals. Is this overkill could I use a trigger - after insert if list_dt > SysDate + 48 then delete from...I'm not familar with stored procedures or DBMS_JOB so I don't want to bit off more than I have to. Thanks for the help.
-
I believe you could use either approach.
A stored procedure may be easier to do...
Basically, check the sysdate against your required time.
ie.
select sysdate from dual into v_time;
if v_time > some_other_variable;
dont_do_procedure;
else
d_procedure;
There may be other ways too...
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
|