Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not in with multiple field
Message
De
08/07/2003 14:14:44
David Brunelle
Université de Sherbrooke
Sherbrooke, Québec, Canada
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Not in with multiple field
Divers
Thread ID:
00808135
Message ID:
00808135
Vues:
37
Hi,
I want to do an update of my database to add fields only if the set of field (4 field ) are not found . With one field you can do
Select * from Test where ID not in (Select distinct ID from site) and it would return all ID that are not in the table.. How do you that with 4 fields (a sort of Select * from Test where ID,ID2,ID3,ID4 not in (Select distinct ID,ID2,ID3,ID4 from site). None of these field are primary key though. (one table is only a list of all existing element and the other one the actual table I want to update, but the primary key for this table is a automatically assigned number).
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform