From: | Yon Den Baguse Ngarso <yon(at)dugem(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, yon(at)dugem(dot)com |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: SELECT ... WHERE ... NOT IN (SELECT ...); |
Date: | 2002-08-29 06:14:58 |
Message-ID: | 20020829061459.0BBB03954@sitemail.everyone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>Yon Den Baguse Ngarso <yon(at)dugem(dot)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(at)dugem(dot)com at http://www.dugem.com
_____________________________________________________________
Promote your group and strengthen ties to your members with email(at)yourgroup(dot)org by Everyone.net http://www.everyone.net/?btn=tag
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2002-08-29 13:41:29 | Re: signed/unsigned integers |
Previous Message | Tom Lane | 2002-08-29 05:34:01 | Re: [SQL] LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? |