General information
Forum:
Microsoft SQL Server
Title:
Not in with multiple field
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only