dbTalk Databases Forums  

Archive tables

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Archive tables in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Smith
 
Posts: n/a

Default Archive tables - 03-12-2006 , 03:21 PM






I would like to create a DTS package that will copy tables from one database
to the other daily.

This tables should be 120 days old {created more than 120 days ago and they
should have data}

After the tables are moved, I would like for the source tables to be
truncated.

Any suggestions on how to go about this ?



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Archive tables - 03-13-2006 , 03:06 PM






Hello John,

When you say copy tables I presume you mean the data within the tables.

If you can identify the date of the data within the tables then you can use
a Transform Data Task with a SourceSQLStatement set to your query that only
selects the relevant data. On Success iof the transfer of the data through
workflow you can TRUNCATE tthe source tables using an ExecuteSQL task.

Have I understaood your requirements correctly?




Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I would like to create a DTS package that will copy tables from one
database to the other daily.

This tables should be 120 days old {created more than 120 days ago and
they should have data}

After the tables are moved, I would like for the source tables to be
truncated.

Any suggestions on how to go about this ?




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.