Information générale
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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement