Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
vivekchandra9
Starting Member
5 Posts |
Posted - 2005-06-07 : 14:58:10
|
| I have six tables Transactiontdr,hdr,crd,dtl,tax,dsc and only one table Transactionhdr has datetime column. I want to archive data from these tables to another server with the same table names and relations but only data which five days older from today. there are a lot of rows which have data back till 2003. But i want the complete tables keeping their desing intact and records for only five days back. how can I do it?if i try to export data, either I can export all data in one table or all table without that where clause in it. |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-06-07 : 15:39:13
|
| I would1. Create tables that are exact except for adding a datetime column with a default of getdat()2. Create a batch process to move the data for a period of time you want to keep and run it3. Then schedule that process to run nightly and remove the data for 5 days.Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
|
|
|