Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selectively copying records from one table to another
Message
De
06/06/2010 15:00:12
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01467562
Message ID:
01467574
Vues:
32
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform