Re: Help with Select Statement - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: Help with Select Statement
Date
Msg-id 4074F3CE.9040409@e-trolley.de
Whole thread Raw
In response to Re: Help with Select Statement  (Kevin Lohka <klohka@aboutfacedata.ab.ca>)
List pgsql-novice
Kevin Lohka wrote:
> Thanks for you response Nabil, I'm not sure if it solves my problem as
> there may be multiple records in the "bar" table, but I'll work through it.

There are several ways to return only 1 result out of many:
GROUP BY ( for aggregate functions like max, min, avg )
DISTINCT ( quick & dirty ;)
LIMIT    ( probably together with ORDER BY cut the result )

And remember: whenever you run into a hopeless situation: you can still use
subqueries in postgresql :)

--
  e-Trolley Sayegh & John, Nabil Sayegh
  Tel.: 0700 etrolley /// 0700 38765539
  Fax.: +49 69 8299381-8
  PGP : http://www.e-trolley.de

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump filling up root directory
Next
From: "Sheeraz fazal"
Date:
Subject: How to call a function of PL/pgSQL