Received: from neptun.sns-felb.debis.de (neptun.sns-felb.debis.de [53.122.101.2]) by postgresql.org (8.11.3/8.11.1) with SMTP id f566hoE15072 for ; Wed, 6 Jun 2001 02:43:51 -0400 (EDT) (envelope-from Jens.Hartwig@t-systems.de) Received: by neptun.sns-felb.debis.de; id IAA17273; Wed, 6 Jun 2001 08:43:49 +0200 Received: from unknown(53.47.15.3) by neptun.sns-felb.debis.de via smap (V5.0) id xma017260; Wed, 6 Jun 01 08:43:42 +0200 Received: from mail2000.b3.dsh.de (localhost [127.0.0.1]) by dshmail.dsh.de (8.8.7/8.8.7) with ESMTP id IAA26102; Wed, 6 Jun 2001 08:42:32 +0200 (MET DST) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: Distinct Values X-MimeOLE: Produced By Microsoft Exchange V6.0.4418.65 Date: Wed, 6 Jun 2001 08:43:20 +0200 Message-ID: <819FEEAC94E6DC459F1FDC83C0C1611F1D7D6C@mail2000.b3.dsh.de> Thread-Topic: [SQL] Distinct Values Thread-Index: AcDt/h37aVk7ovyiRVayWzq3SF3frQAVQjKw From: "Hartwig Jens" To: "Nicolas" , Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id f566hsE15085 X-Archive-Number: 200106/54 X-Sequence-Number: 3266 Hello Nicolas, the query you want to construct cannot work because the result of a query always consists of a consistent table. That means that in a two-column-table every item on the "left side" has one single opponent on "the right side". How should your table be built up at all? I suppose that you want something like the following: Author URL ------- -------- A http://www.xyz.com http://www.abc.com - - B http://www.def.com http://www.ijk.com http://www.rst.com - - If that is what you want, you cannot manage it. Hope this helps ... although it does not really help you :-) Best regards, Jens Hartwig ----------------------------------------------------- T-Systems Project Manager debis Systemhaus GEI GmbH Address: Eichhornstraße 3, 10785 Berlin Postal Address: 10785 Berlin Phone: (004930) 25 54-32 82 Fax: (004930) 25 54-31 87 Mobile: (0170) 167 26 48 E-Mail: jens.hartwig@t-systems.de Internet: http://www.t-systems.de > -----Ursprüngliche Nachricht----- > Von: Nicolas [mailto:bnk@medialife.net] > Gesendet: Mittwoch, 30. Mai 2001 20:23 > An: pgsql-sql@postgresql.org > Betreff: [SQL] Distinct Values > > > Hi, > > I'm trying to retreive DISTINCT Values from a two colomn table called > "Books". The colomns are named "Author" and "URL". > DISTINCT values should be retieved from the "Author" Colomn , > and then I > should be able to retrieve the corresponding URL. > How do I build the SQL Query ? > I tried to use: "SELECT DISTINCT Author FROM Books" But this > does not allow > me to fetch the URL value on the other colomn. > > Thanks > Nicolas > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to > majordomo@postgresql.org) >