Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C16A447624A for ; Thu, 22 Aug 2002 23:40:00 -0400 (EDT) Received: from omta02.mta.everyone.net (sitemail3.everyone.net [216.200.145.37]) by postgresql.org (Postfix) with ESMTP id 4DC6647617B for ; Thu, 22 Aug 2002 23:40:00 -0400 (EDT) Received: from sitemail.everyone.net (dsnat [216.200.145.62]) by omta02.mta.everyone.net (Postfix) with ESMTP id 6B8CD1C8492 for ; Thu, 22 Aug 2002 20:39:53 -0700 (PDT) Received: by sitemail.everyone.net (Postfix, from userid 99) id 64A443955; Thu, 22 Aug 2002 20:39:52 -0700 (PDT) Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Date: Thu, 22 Aug 2002 20:39:52 -0700 (PDT) From: Yon Den Baguse Ngarso To: pgsql-sql@postgresql.org Subject: SELECT ... WHERE ... NOT IN (SELECT ...); Reply-To: yon@dugem.com X-Originating-Ip: [202.152.11.250] Message-Id: <20020823033952.64A443955@sitemail.everyone.net> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/316 X-Sequence-Number: 9162 opennms=# SELECT eventid FROM tbl1; eventid --------- 119064 119064 60116 16082 16082 16303 16082 92628 92628 60083 (10 rows) opennms=# SELECT eventid FROM tbl2; eventid --------- 123989 123989 123989 16134 16134 16368 16134 92685 92685 60115 (10 rows) opennms=# SELECT eventid FROM tbl1 WHERE eventid NOT IN (SELECT eventid FROM tbl2); eventid --------- (0 rows) I'm confused, the result should not 0 rows, right? Pls Help. Am I missing something? TIA. _____________________________________________________________ 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