You must have some date column in the table where you want to delete old records. You can calculate the difference between the system date and valus in that column and delete records having the difference > 365 days. To calculate the difference use DateDiff(d, [date column name], GetDate()) expression in the WERE clause of the DELETE statement. : Hello friends! : can somebody tell me how i can delete records from database which : is older than year and doing so what care should : i have to take about database. Database is SQL SERVER2000 : can tell me stored procedure : somebody help me out : thanks!!
|