Re: Why lower's not accept an AS declaration ? - Mailing list pgsql-general

From Ian Barwick
Subject Re: Why lower's not accept an AS declaration ?
Date
Msg-id 200308182215.07841.barwick@gmx.net
Whole thread Raw
In response to Re: Why lower's not accept an AS declaration ?  (Hervé Piedvache <herve@elma.fr>)
List pgsql-general
On Monday 18 August 2003 18:59, Hervé Piedvache 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);

How about something like:

select
  case when 'now' between t.begin and t.end then t.login else 'None' end
    as log,
  LOWER(case when 'now' between t.begin and t.end then t.login else 'None'
    end)
    as log_lower
  from my_table t
  order by 2;

Ian Barwick
barwick@gmx.net

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Default Value in Table Setup Help
Next
From: "Darko Prenosil"
Date:
Subject: Re: Why lower's not accept an AS declaration ?