Re: How to sort strings containing a dot?

From: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>
To: "'Pierre LEBRECH'" <pierre(dot)lebrech(at)laposte(dot)net>, "'Roberts, Jon'" <Jon(dot)Roberts(at)asurion(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to sort strings containing a dot?
Date: 2008-03-25 16:46:35
Message-ID: 03d201c88e97$ca7091c0$5f51b540$@r@sbcglobal.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> By the way, I have just inserted a duplicate. Then I have run the
> select statement with distinct and I got an error.
>
> How one can solve this?
>

Does this work?

select distinct name
from ( select name from t order by replace(name, '.', 'a')) as t2

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message LARC/J.L.Shipman/jshipman 2008-03-25 16:49:32 pg_ctrl stop problems (psql 8.2.5)
Previous Message Pierre LEBRECH 2008-03-25 16:41:55 Re: How to sort strings containing a dot?