Re: Filtering a bunch of records to one after a selection has returned a bunch of them

From: caldodge(at)fpcc(dot)net (Calvin Dodge)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Filtering a bunch of records to one after a selection has returned a bunch of them
Date: 2002-01-01 23:37:17
Message-ID: ca6275f0.0201011537.40906e1e@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

jfc100(at)btopenworld(dot)com (Joe) wrote in message news:<88d9f4b3(dot)0112270701(dot)4a3741d(at)posting(dot)google(dot)com>...

> I am trying to establish whether or not it is possible - and how to
> implement the solution - to execute an sql statement and restricting
> the results to a single match even though there may be more than a
> single record which matches the criteria.
>
> e.g. select min(counter) from my_table butonlyone;

Ummm ... "select something from thistable limit 1".

Or is there something I'm missing here?

Calvin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-01-02 00:35:50 Re: plpgsql and rowtypes
Previous Message Dave Trombley 2002-01-01 23:31:08 plpgsql and rowtypes