pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yon Den Baguse Ngarso <yon@dugem.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: yon@dugem.com
Cc: pgsql-sql@postgresql.org
Subject: Re: SELECT ... WHERE ... NOT IN (SELECT ...);
Date: Wed, 28 Aug 2002 23:14:58 -0700 (PDT)
Message-ID: <20020829061459.0BBB03954@sitemail.everyone.net> (raw)

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



view thread (9+ messages)

Message-ID: <20020829061459.0BBB03954@sitemail.everyone.net>
Permalink:  ../20020829061459.0BBB03954@sitemail.everyone.net/
Also on:    postgresql.org/message-id/20020829061459.0BBB03954@sitemail.everyone.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: yon@dugem.com, tgl@sss.pgh.pa.us
  Subject: Re: SELECT ... WHERE ... NOT IN (SELECT ...);
  In-Reply-To: <20020829061459.0BBB03954@sitemail.everyone.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox