Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to over-write a table in C# Sql select
Message
De
08/08/2010 18:02:55
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01475647
Message ID:
01475687
Vues:
34
Naomi,
>Insert into TableA (Country, State) select * from TableB 
>where not exists
> (select 1 from TableA where TableA.State = TableB.State and TableA.City = TableB.City) -- if you only want to append new (not existing) records
The above doesn't work, you'll get an error. You need to specifically name the columns:
Insert into TableA (Country, State) select Country, State from TableB 
~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform