Re: Making NULL entries appear first when ORDER BY ASC

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: Making NULL entries appear first when ORDER BY ASC
Дата
Msg-id 1a4e31bde16a440691d672a49fc080de@biglumber.com
обсуждение исходный текст
Ответ на Making NULL entries appear first when ORDER BY ASC  (Andreas Joseph Krogh <andreak@officenet.no>)
Список pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



> Now, as you see, touples with NULL in the "start_time"-field
> appear "after" the others. I would like to make all entries
> where start_time IS NULL apear *before* all the others.

ORDER BY start_date, CASE WHEN start_time IS NULL THEN 0 ELSE 1 END, start_time

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200502152309
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFCEseYvJuQZxSWSsgRAlipAJwKAyqAyLbo9hfpoWkz0SOlTY3feACfa+ng
DqNY4DAJ5TeeGQbI+smNilg=
=LRhP
-----END PGP SIGNATURE-----




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

Предыдущее
От: Ragnar Hafstað
Дата:
Сообщение: Re: Making NULL entries appear first when ORDER BY
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Making NULL entries appear first when ORDER BY ASC