Re: Problem with NOT IN and Sub-Select - Mailing list pgsql-general

From Richard Huxton
Subject Re: Problem with NOT IN and Sub-Select
Date
Msg-id 41F7B6DF.7090300@archonet.com
Whole thread Raw
In response to Problem with NOT IN and Sub-Select  (mike <mike@redtux1.uklinux.net>)
List pgsql-general
mike wrote:
> I have the following query
>
> SELECT vw_mail_add.contact_id, vw_mail_add.first_name,
> vw_mail_add.last_name, vw_mail_add.address1, vw_mail_add.add2,
> vw_mail_add.add3, vw_mail_add.add4, vw_mail_add.add5, vw_mail_add.add6
> FROM vw_mail_add JOIN tb_contact_role ON vw_mail_add.contact_id =
> tb_contact_role.contact_id WHERE tb_contact_role.type2 = 72 AND
> tb_contact_role.contact_id NOT IN ( SELECT contact_id FROM
> tb_contact_role WHERE  type2 <> 72);

Don't suppose that subselect could return any NULLs could it?

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: how come I get this error message when I try to connect
Next
From: Robby Russell
Date:
Subject: Re: Extended unit