Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selectively copying records from one table to another
Message
From
06/06/2010 15:00:12
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01467562
Message ID:
01467574
Views:
31
Will that append the records to the target table?


>>This client wants to archive records from one table into another before deleting the source records.
>What is the best syntax for doing that with TSQL?
>
>Thanks



select Fields into MyArchiveTable from myTableToClean where some condition

-- Now if we can truncate the original (no dependencies) -- it would be the fastest metod

truncate table myTableToClean
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform