General information
Forum:
Microsoft SQL Server
You could do it like this:
select * from table1
where field1 not in (select field1 from table2) and
field1 not in (select field2 from table2) and
field1 not in (select field3 from table2)
That will return a row if table1.field1 is not equal to any field in table2.
>Is there a way to use more than one field when I determine if a record is not in a specific subquerey? For example:
>
> select * from table1 where field1 not in(select * from table2)
>
>I would like check all of the fields from table1 and determine if that EXACT record is contained in table2.
>
>Thanks in advance
>Kelly
Previous
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