Forum Moderators: open
Can anyone tell me how to setup an automatic delete in my MSSQL Database. I would like to set something up so that all entries from 2 months previous will be deleted. i.e. When January comes, everything from November will be deleted, when February comes, everything from December will be deleted. I know i can set up a delete admin page, but is there anyway to get SQL Server to automatically do it?
Regards
Webboy
1) Create an SQL function in a script page which deletes the records you want.
2) Call this script every month through an automatic scheduler, such as the NT at command, or a crontab/lynx combination.
It's not the answer you were looking for, but I hope it helps!
JP