Sorting empty rows at the bottom of a recordset

Поиск
Список
Период
Сортировка
От Matt Arnilo S. Baluyos (Mailing Lists)
Тема Sorting empty rows at the bottom of a recordset
Дата
Msg-id d1a6d7930512091810p457ebb80q6416f99e68fbf1d0@mail.gmail.com
обсуждение исходный текст
Ответы Re: Sorting empty rows at the bottom of a recordset  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-novice
Hello everyone,

I have a PHP application that gets its database from PostgreSQL. I'm
trying to figure out a way to get around an ORDER BY problem.

I have a recordset that returns rows based on a column (ORDER BY
writer_lname, i.e. writer's last names). There are however rows which
have empty values and these get sorted at the top of the recordset.
What the boss would want to see is these rows to be sorted at the
bottom of the recordset.

Is there any way around this at the PostgreSQL level? I can definitely
put some code in the PHP (application) level but that would be too
inefficient I think.

Any pointers would be greatly appreciated.

Best regards,
Matt

--
Stand before it and there is no beginning.
Follow it and there is no end.
Stay with the ancient Tao,
Move with the present.

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Bind Variables and Quoting / Dequoting Input
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Sorting empty rows at the bottom of a recordset