Re: Why lower's not accept an AS declaration ?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Why lower's not accept an AS declaration ?
Дата
Msg-id 20030818185913.GA2816@wolff.to
обсуждение исходный текст
Ответ на Re: Why lower's not accept an AS declaration ?  (Hervé Piedvache <herve@elma.fr>)
Список pgsql-general
On Mon, Aug 18, 2003 at 18:59:44 +0200,
  Hervé Piedvache <herve@elma.fr> wrote:
> Hi,
>
> An to be more precise what I exactly want to do :
>
> select
> case when 'now' between t.begin and t.end then t.login else 'None' end as log
> from my_table t
> order by lower(log);
>
> Is it an example more realistic for you to make an order by lower of something
> as an alias ?

You can repeat the case statement inside the lower function to do what you
want. (Assuming you didn't want 'None' to sort specially.)

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Hour difference?
Следующее
От: Steve Worsley
Дата:
Сообщение: Re: Hour difference?