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:13:34
 
 
À
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:
01467575
Vues:
39
Will that append the records to the target table?

Bill, no, it will not.

When you do a SELECT Field_List into NewTable from OldData, NewTable cannot already exist. (If it does, you'll get an error). So it's not additive.

SELECT INTO NewTable is great when the table doesn't exist - it gets created....but again, if it already exists, you'll get an error.


If you want to append rows into an existing target table...you can do an INSERT INTO....SELECT....such as

INSERT TO "TableYouWantToAppendTo" Select "columns" from ExistingTable. (You'll need to be careful with the matching column lists)

Hope that helps...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform