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 [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match