Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not in with multiple field
Message
From
08/07/2003 14:14:44
David Brunelle
Université de Sherbrooke
Sherbrooke, Quebec, Canada
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Not in with multiple field
Miscellaneous
Thread ID:
00808135
Message ID:
00808135
Views:
38
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).
Next
Reply
Map
View

Click here to load this message in the networking platform