| От | Jeff Eckermann |
|---|---|
| Тема | Re: still sorting and casting problems |
| Дата | |
| Msg-id | 20020912135751.82100.qmail@web20806.mail.yahoo.com обсуждение |
| Ответ на | still sorting and casting problems (juerg.rietmann@pup.ch) |
| Список | pgsql-sql |
--- juerg.rietmann@pup.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
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера