Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: way to delete records after a period of time if they meet criteria?

Re: way to delete records after a period of time if they meet criteria?

From: Jigi <jigi_at_poczta.onet.pl>
Date: Thu, 8 Jul 2004 17:02:17 +0200
Message-ID: <ccjnoo$l4h$1@news.onet.pl>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US