From: | Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com> |
---|---|
To: | juerg(dot)rietmann(at)pup(dot)ch, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: still sorting and casting problems |
Date: | 2002-09-12 13:57:51 |
Message-ID: | 20020912135751.82100.qmail@web20806.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
--- juerg(dot)rietmann(at)pup(dot)ch wrote:
> I need to sort the query by the log_date desc
> (log_date is char(10)). I
> tried the following without success :
>
> select id, log_date from userlog order by cast
> (log_date as date) desc
>
> select id, log_date from userlog order by
> date(log_date) desc
>
> Please help and thank's in advance ... jr
>
You haven't shown the error message here, but I'm
guessing that there is no direct cast between char and
date available in PostgreSQL. Try casting first to
text, then to date.
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2002-09-12 14:02:06 | Re: Select the max on a field |
Previous Message | Stephan Szabo | 2002-09-12 13:54:29 | Re: still sorting and casting problems |