RE: distinct+trim=error? - Mailing list pgsql-novice

From Tamsin
Subject RE: distinct+trim=error?
Date
Msg-id NEBBKHBOBMJCHDMGKCNJAEIECDAA.tg_mail@bryncadfan.co.uk
Whole thread Raw
In response to distinct+trim=error?  (Boszormenyi Laszlo <gcs@jupiter.hlab.uni-miskolc.hu>)
List pgsql-novice
Probably (can't try this at the moment as I'm at home) you need to do:

 select distinct trim(city) from lodge order by trim(city);

Hope this helps
Tamsin

> -----Original Message-----
> From: pgsql-novice-owner@hub.org [mailto:pgsql-novice-owner@hub.org]On
> Behalf Of Boszormenyi Laszlo
> Sent: 24 September 2000 14:43
> To: pgsql-novice@hub.org
> Subject: [NOVICE] distinct+trim=error?
>
>
> Hello!
>
>  First, thanks for everybody who helped me with my previous problem.
> Now I have an other, and I can not figure out why this happens.
> Any idea?
>
> => select distinct trim(city) from lodge order by city;
> ERROR:  For SELECT DISTINCT, ORDER BY expressions must appear in
> target list
>
> Cheers,
>     Laszlo
>
>

pgsql-novice by date:

Previous
From: Boszormenyi Laszlo
Date:
Subject: distinct+trim=error?
Next
From:
Date:
Subject: Re: Case (in)sensitive