Re: Order by YYYY MM DD in reverse chrono order trouble

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: Order by YYYY MM DD in reverse chrono order trouble
Дата
Msg-id 9ae4fad2ef01b3eebb7769a43b955c0b@biglumber.com
обсуждение исходный текст
Ответ на Order by YYYY MM DD in reverse chrono order trouble  (<ogjunk-pgjedan@yahoo.com>)
Список pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I am trying to select distinct dates and order them in the reverse
> chronological order.  Although the column type is TIMESTAMP, in this
> case I want only YYYY, MM, and DD back.
If you don't need them separated (which I suspect may be the case),
you can do something like this: 
SELECT DISTINCT TO_CHAR(add_date,'YYYY-MM-DD') AS bb FROM tt ORDER BY bb DESC;
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200404240716
-----BEGIN PGP SIGNATURE-----
iD8DBQFAikzOvJuQZxSWSsgRAgqbAKDC75SQd2aExYaniSJIzovOlVjvCACgyOAl
Q2KMp3YGBkQwy5y4h9r/96A=
=4idZ
-----END PGP SIGNATURE-----




В списке pgsql-sql по дате отправления:

Предыдущее
От: "Riccardo G. Facchini"
Дата:
Сообщение: Re: Trigger calling a function HELP ME! (2)
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Design Problem...