Re: How to sort strings containing a dot?

Поиск
Список
Период
Сортировка
От Pierre LEBRECH
Тема Re: How to sort strings containing a dot?
Дата
Msg-id 47E92F34.40006@laposte.net
обсуждение исходный текст
Ответ на Re: How to sort strings containing a dot?  ("Adam Rich" <adam.r@sbcglobal.net>)
Ответы Re: How to sort strings containing a dot?
Список 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 по дате отправления:

Предыдущее
От: "Adam Rich"
Дата:
Сообщение: Re: How to sort strings containing a dot?
Следующее
От: "Roberts, Jon"
Дата:
Сообщение: Re: How to sort strings containing a dot?