February 6, 2003 at 9:08 am
An application developer would like for an entire record to be automatically deleted after a datetime field has existed for exactly a year within the database. As a novice DBA, I'm not sure how best to approach this task. Please advise. Thanks.
Carpe diem!
Carpe diem!
February 6, 2003 at 9:12 am
Probably the best way to achieve this is to create a scheduled job to delete all records in the table with dates more than a year old.
The only choice you have then is how frequently you would like that job to execute.
February 6, 2003 at 9:15 am
I would create a SQL Server Agent job that runs nightly and deleted records that are older than a year
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply