delete rows older than 2 years from current date

Analytics

delete rows older than 2 years from current date

i am running job today 2007-02-06...i want to delete data prior to 2005-02-06
please help me in this regard

Thanks in advance
chinna
1 REPLY

Re: delete rows older than 2 years from current date

First try to build an SQL select query with a 'where clause' of the date u mentioned.
Check if the data u intend to delete is selected or not.
Then change the select to delete with same where clause.
Test it on few rows first.
If the result is as expected then change the where condition accordingly and then run it on production data.
Hope this helps.