答复: Delete Data older than exactly 2 years

  • From: "jametong" <jametong@xxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 20 Apr 2007 10:15:28 +0800

date_col <= add_months(sysdate,-24)
 

Jametong


DBA Team. B2B. 阿里巴巴中国

----------------------------
Phone   : 0571-85022088-12372
Fax     : 0571-85022958
Mobile  : 135-8803-9828
Mail    : jame.tongjw@xxxxxxxxxxxxxxx
          jametong@xxxxxxxxx
Msn     : kt_tongjiawang@xxxxxxxxxxx
Yahoo   : jametong
Alitalk : jametong
Skype   : jametong
-----------------------------


 

  _____  

发件人: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] 代
表 Sanjay Mishra
发送时间: 2007年4月20日 9:08
收件人: oracle-l@xxxxxxxxxxxxx
主题: Delete Data older than exactly 2 years


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.
 
TX
Sanjay


  _____  

Ahhh...imagining that irresistible "new car" smell?
Check out new
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3o
DMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-> cars at
Yahoo! Autos. 

Other related posts: