X-Original-To: pgsql-sql@postgresql.org Received: from koshin.dsl.systemec.nl (systemec-gw.customer.nl.uu.net [213.53.28.186]) by postgresql.org (Postfix) with ESMTP id 4B1FF4758E6 for ; Wed, 12 Mar 2003 05:04:10 -0500 (EST) Received: from systemec050 (unknown [193.67.121.51]) by koshin.dsl.systemec.nl (Postfix) with ESMTP id BBFD01CB1A5 for ; Wed, 12 Mar 2003 11:04:10 +0100 (CET) Received: from Spooler by systemec050 (Mercury/32 v3.32) ID MO0006EF; 12 Mar 03 11:03:52 +0100 Received: from spooler by arbodienst-limburg.nl (Mercury/32 v3.32); 12 Mar 03 11:03:50 +0100 From: "Jules Alberts" Organization: ARBOdienst Limburg BV To: pgsql-sql@postgresql.org Date: Wed, 12 Mar 2003 11:03:35 +0100 MIME-Version: 1.0 Subject: filtering out doubles X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Message-Id: <20030312100410.BBFD01CB1A5@koshin.dsl.systemec.nl> X-Archive-Number: 200303/291 X-Sequence-Number: 12331 Hello everyone, I was wondering how to filter out double values (where "value" spans two columns COL1 and COL2) with a SELECT statement. If I have this table: COL1 |COL2 |COL3 ----------------------------- a |b |some value a |b |another value a |c |yet another value what would be the select statement to get this result: COL1 |COL2 |COL3 ----------------------------- a |b |some value a |c |yet another value I was thinking that DISTINCT would do this, but I don't want to loose COL3. TIA for any tips!