I'm looking for a query which will delete all the data that is over 15 months old from a table called Tab A. The column which holds the time is called Data Time. The query will be schedule to run at the end of every month and it should delete the data that is over 15 months.
For ex: If the Data Time is 05/11/09, the query should delete all the rows that are over 03/11/08.
Below is the query I'm trying, I would really appreciate if y'all can provide some comments or suggestions.
DELETE FROM [TABLE A]
WHERE DATEADD (MONTH,-15,[DATA TIME])