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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Delete records in a table older than 90 days .

Author  Topic 

admin001
Posting Yak Master

166 Posts

Posted - 2002-08-02 : 12:05:46
Hi ,

I have a scheduled job which does an text file import in my database . The data gets appended in my table every day from this import job .

Since my table is growing every day , i want to truncate the table after the data has been collected for three months i.e 90 days . The table will be empty and the new data will flow in through the import .

Any thoughts how to do it through query and schedule it ???

Thanks

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2002-08-02 : 12:13:47
have a look at the following ..... in particular robvolk's code...

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=18430

and you can put this as part of the DTS job you use to load the data...(once it's a SP)....

Go to Top of Page
   

- Advertisement -