Re: How to sort strings containing a dot? - Mailing list pgsql-general

From Pierre LEBRECH
Subject Re: How to sort strings containing a dot?
Date
Msg-id 47E92F34.40006@laposte.net
Whole thread Raw
In response to Re: How to sort strings containing a dot?  ("Adam Rich" <adam.r@sbcglobal.net>)
Responses Re: How to sort strings containing a dot?
List pgsql-general
Thanks Adam. No, It doesn't.

But I have found a solution which works :

select name from (select distinct name from t) as name order by replace(name, '.', 'a');
   name
----------
 co.aaa
 co.abb
 co.cab
 co.ment
 com
 com.enta
(6 lines)


Thanks to all of you.


Adam Rich wrote :
>> 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
>
>
>


pgsql-general by date:

Previous
From: "Adam Rich"
Date:
Subject: Re: How to sort strings containing a dot?
Next
From: "Roberts, Jon"
Date:
Subject: Re: How to sort strings containing a dot?