June 22, 2007 at 3:08 pm
Hi
Does anyone have any scripts to archive data older than 6 months?
I have one column in the table that has the row added date and time.
Thanks
June 22, 2007 at 7:34 pm
Your handle says "SQLDBA" so I'm thinking that you know where Books Online is... lookup DATEADD, Insert, Delete, and WHERE NOT IN.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 24, 2007 at 11:06 pm
I have already written a stored procedure and placed in my blog http://sugeshkr.blogspot.com which archive data for a datefield every 45 days you can change the sp as per your convience.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
June 25, 2007 at 12:08 pm
I'd also like to add that in the real world it is seldom as easy as filtering on a date for a single table. You'll need to know whether or not that data is referenced somewhere else in your database and if it is, you'll need to deal with it there also.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply