Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8B6592E303E for ; Mon, 4 Feb 2008 23:20:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40310-01-6 for ; Mon, 4 Feb 2008 23:20:42 -0400 (AST) Received: from n054.sc0.he.tucows.com (smtpout1072.sc0.he.tucows.com [64.97.144.72]) by postgresql.org (Postfix) with ESMTP id 2A1252E308A for ; Mon, 4 Feb 2008 23:20:39 -0400 (AST) Received: from sc0-out08.emaildefenseservice.com (64.97.131.2) by n054.sc0.he.tucows.com (7.2.069.1) id 476BFC7B00BA2437 for pgsql-sql@postgresql.org; Tue, 5 Feb 2008 03:20:37 +0000 X-SpamScore: 2 X-Spamcatcher-Summary: 2, 0, 0, df0b084c70096286, abf97706601ff78b, ray@madigans.org, -, RULES_HIT:355:379:539:540:541:542:543:599:600:601:945:960:968:973:988:989:1253:1260:1277:1297:1298:1311:1313:1314:1345:1437:1515:1516:1518:1534:1539:1587:1593:1594:1711:1730:1747:1766:1792:2393:2540:2551:2553:2559:2562:2828:3027:3352:3590:3636:3865:3866:3867:3871:3872:3873:3874:4250:4362:5007:6119:6261:7576, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF: ,MSBL:none,DNSBL:none X-Spamcatcher-Explanation: Received: from dreamland (unknown [74.94.66.41]) (Authenticated sender: ray@madigans.org) by sc0-out08.emaildefenseservice.com (Postfix) with ESMTP for ; Tue, 5 Feb 2008 03:20:36 +0000 (UTC) From: "Ray Madigan" To: "Pgsql-Sql" Subject: Re: Except without elimination of non-distinct rows Date: Mon, 4 Feb 2008 19:23:03 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/13 X-Sequence-Number: 30104 I tried using EXCEPT ALL but it seems to only remove one row when there is more then one matching row? Thanks Ray Madigan -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Tom Lane Sent: Monday, February 04, 2008 6:20 PM To: Ray Madigan Cc: Pgsql-Sql Subject: Re: [SQL] Except without elimination of non-distinct rows "Ray Madigan" writes: > Is there any way to use except that won't remove the non-distinct rows from > the left side of the query? EXCEPT ALL might or might not do what you're hoping for. Check the manual (I think the SELECT reference page is what to look at). regards, tom lane