X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 11652474E5C for ; Thu, 20 Feb 2003 01:46:39 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 71008-01 for ; Thu, 20 Feb 2003 01:46:28 -0500 (EST) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 470B9474E4F for ; Thu, 20 Feb 2003 01:46:28 -0500 (EST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2848733; Wed, 19 Feb 2003 22:46:36 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: Mark Mitchell , pgsql-sql@postgresql.org Subject: Re: EXCEPT Queries Date: Wed, 19 Feb 2003 22:45:15 -0800 User-Agent: KMail/1.4.3 References: <3E53D806.5030501@lapcrew.com> In-Reply-To: <3E53D806.5030501@lapcrew.com> MIME-Version: 1.0 Message-Id: <200302192245.15808.josh@agliodbs.com> Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/449 X-Sequence-Number: 11847 Mark, > SELECT > "A"."SUBSCRIBER_NAME" , "A"."ACCOUNT_NUMBER" > FROM "A" > WHERE > "A"."ACCOUNT_NUMBER" > NOT IN > ( > SELECT > "B"."ACCOUNT_NUMBER" > FROM "B" > ) Use "WHERE NOT EXISTS" instead. See the documentation on SELECT for how t= o=20 write this clause. --=20 Josh Berkus Aglio Database Solutions San Francisco