Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outer Join??????
Message
 
 
À
11/11/2001 18:05:30
Joel Hokanson
Services Integration Group
Bellaire, Texas, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00580307
Message ID:
00580320
Vues:
8
>I have two SQL 2000 tables (in same database) of phone numbers, TableA and TableB both same format.
>
>I want to ADD to TableA any record (phone number) that is in TableB, but not in TableA
>
>Is that an Outer Join? What would be the syntax????

Try following (not tested)
INSERT INTO tablea
   SELECT * FROM tableb
   WHERE NOT EXISTS ( SELECT * FROM tablea WHERE tablea.phone =  tableb.phone)
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform