Re: SELECT DISTINCT ... ORDER BY UPPER(column_name) fails

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SELECT DISTINCT ... ORDER BY UPPER(column_name) fails
Дата
Msg-id 15015.1194196351@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SELECT DISTINCT ... ORDER BY UPPER(column_name) fails  (Aymeric Levaux <aymeric@javablackbelt.com>)
Список pgsql-sql
Aymeric Levaux <aymeric@javablackbelt.com> writes:
> SELECT DISTINCT tag FROM logs ORDER BY UPPER(tag);
> You get the following error message :
> for SELECT DISTINCT, ORDER BY expressions must appear in select list.

> It is weird as the order by column appears in the select.

No it doesn't.  The ORDER BY expression is "UPPER(tag)" not just "tag".
        regards, tom lane


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

Предыдущее
От: Aymeric Levaux
Дата:
Сообщение: SELECT DISTINCT ... ORDER BY UPPER(column_name) fails
Следующее
От: Volkan YAZICI
Дата:
Сообщение: Partitioning and Foreign Keys