* Rudi Starcevic <rudi@oasis.net.au> [08.04.2003 11:37]:
> CASE
> WHEN COALESCE( MAX(e.edate),'2003-01-01') >= now()::date THEN 'events'
> ELSE 'noevents'
> END as myevents,
I'm not sure completely, but first thing i saw in your query, is:
...COALESCE( MAX(e.edate),'2003-01-01')...
MAX(e.edate): will return date type (just a guess)
'2003-01-01': will return char type (or varchar, doesn't matter).
Try to cast string into date.
--
Victor Yegorov