Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: way to delete records after a period of time if they meet criteria?
use dbms_job package to schedule running of procedure which includes your
delete statement
Użytkownik "kaeli" <tiny_one_at_NOSPAM.comcast.net> napisał w wiadomości
news:MPG.1b570918bf915875989f59_at_nntp.lucent.com...
>
> Hey all,
>
> I know I could do this with a cron and a script, but I'm looking into if
> it can be done easily right from Oracle.
> I'm using Oracle 8i on a Unix Solaris box.
>
> Simplified:
> I have a table with records for name, item purchased, date entered, and
> date paid. I want to delete the record if the item hasn't been paid for
> in 5 days after entry.
>
> So...
> delete from tablename where datePaid is null and dateEntered < sysdate-5
>
> Can I do that without a cron that runs once daily?
>
> TIA
>
> --
> --
> ~kaeli~
> With her marriage, she got a new name and a dress.
> http://www.ipwebdesign.net/wildAtHeart
> http://www.ipwebdesign.net/kaelisSpace
>
Received on Thu Jul 08 2004 - 10:02:17 CDT