Re: DISTINCT ordering

Поиск
Список
Период
Сортировка
От Ron St-Pierre
Тема Re: DISTINCT ordering
Дата
Msg-id 411915D7.7040801@syscor.com
обсуждение исходный текст
Ответ на Re: DISTINCT ordering  (Jake Stride <nsuk@users.sourceforge.net>)
Список pgsql-novice
Jake Stride wrote:

>Because I don¹t want the name in lower case, what I want is
>
>The
>the
>Z
>
>not:
>
>The
>Z
>the
>
>
>

>This is what I have at present, although slightly adjusted, but I wanted to
>know if it was possible without 2 selects,
>
>SELECT SS.name FROM (SELECT DISTINCT name FROM someview) SS ORDER BY
> lower(name);
>
>Jake
>
>

In that case I don't think that you can do it without a subquery. I
think that if the db was configured with a different locale (en_GB or
en_US) it would sort the data as you want it, but I think that other
problems might occur. I haven't dealt with the locale settings much
myself, but there are frequently questions(problems?) such as yours
which show up on the GENERAL discussion list. You can search the GENERAL
archives and documentation if you want more background on this it it's a
big problem. Or perhaps someone with more 'locale' knowledge might
confirm this.

hth
Ron


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Taber, Mark"
Дата:
Сообщение: What constitutes a pgsql session?
Следующее
От: Eduardo Vázquez Rodríguez
Дата:
Сообщение: Re: Query result to a file