Re: SELECT ... WHERE ... NOT IN (SELECT ...); - Mailing list pgsql-sql

From Yon Den Baguse Ngarso
Subject Re: SELECT ... WHERE ... NOT IN (SELECT ...);
Date
Msg-id 20020829061459.0BBB03954@sitemail.everyone.net
Whole thread Raw
In response to SELECT ... WHERE ... NOT IN (SELECT ...);  (Yon Den Baguse Ngarso <yon@dugem.com>)
List pgsql-sql
O, Yes...
The problem occure because of null from selecting into tbl2.
I have to delete record which eventid=null, and
the result become correct.

Pls be carefull with Null entri when using NOT IN.

Thanks for you all :-)

Regards,
-Yon-

--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
>Yon Den Baguse Ngarso <yon@dugem.com> writes:
>> If i create tbl1 & tbl2, and then load it with the data.
>> The result is CORRECT. Like yours.
>> But, if the data loaded from another table, the result become WRONG/ null record. 
>
>Do you have any nulls in what you are selecting into tbl2?
>The behavior of NOT IN with nulls is not very intuitive.
>
>            regards, tom lane


_____________________________________________________________
Get yourname@dugem.com at http://www.dugem.com

_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net
http://www.everyone.net/?btn=tag


pgsql-sql by date:

Previous
From: "JOE"
Date:
Subject: union optimization in views
Next
From: Kemin Zhou
Date:
Subject: trigger viewing