Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0B3C4475469 for ; Sat, 24 Aug 2002 14:42:59 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 949CF475153 for ; Sat, 24 Aug 2002 14:42:58 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id E0A3A3819C5; Sat, 24 Aug 2002 14:42:57 -0400 (EDT) From: "OU" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: SELECT ... WHERE ... NOT IN (SELECT ...); Date: Sat, 24 Aug 2002 21:23:46 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 48 Message-ID: References: <20020823082835.959193953@sitemail.everyone.net> X-Complaints-To: news@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/385 X-Sequence-Number: 9231 I use a 7.3devel recently build (on a FreeBSD 4.3 box) from CVS sources. I follow all your steps, and psql results : test_db=> \! cat problem.sql --create new temp tbl1 SELECT losteventid AS eventid INTO tbl1 FROM outages; --create new temp tbl2 SELECT regainedeventid AS eventid INTO tbl2 FROM outages; SELECT eventid FROM tbl1 WHERE eventid NOT IN (SELECT eventid FROM tbl2); test_db=> \i problem.sql SELECT SELECT eventid --------- 119064 119064 60116 16082 16082 16303 16082 92628 92628 60083 (10 rows) "Yon Den Baguse Ngarso" a écrit dans le message de news: 20020823082835.959193953@sitemail.everyone.net... > Oops correction. > ... cut > > myhost=# SELECT eventid FROM tbl1 WHERE eventid NOT IN (SELECT eventid FROM tbl2); > eventid > --------- > (0 rows) > > TIA, > Yon >