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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Delete Data older than exactly 2 years

Re: Delete Data older than exactly 2 years

From: rjamya <rjamya_at_gmail.com>
Date: Thu, 19 Apr 2007 22:17:08 -0400
Message-ID: <9177895d0704191917x7d2b1eber760b0f19342eba46@mail.gmail.com>


Why can't you use that logic? And come to think of it, I'd rather run this cleanup on the FIRST sunday of the month. So, I can do a trun() at month (to get the first), then substract 24 months. So you will always cleanup on a month boundary.

Month to month cleanup is always better than on a random date in the last week. What do you think?

rjamya

On 4/19/07, Sanjay Mishra <smishra_97_at_yahoo.com> wrote:
>
> Hi
>
> Can somebody suggest good method to delete all record older than 2 years
> from the current date. This script will run on the last sunday of each
> month. I will write the logic for Last sunday in Unix shell but need some
> idea about the SQL. I can't use some 365+366 or so kind of logic. THis is
> 9i.
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 19 2007 - 21:17:08 CDT

Original text of this message

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