Re: ORDER BY

Поиск
Список
Период
Сортировка
От Niklas Johansson
Тема Re: ORDER BY
Дата
Msg-id AC298A15-7BCA-432A-B304-2049E9316A19@tele2.se
обсуждение исходный текст
Ответ на ORDER BY  ("MicroUser" <a.shafar@gmail.com>)
Ответы Re: ORDER BY  (Brent Wood <b.wood@niwa.co.nz>)
Список pgsql-general
On 14 nov 2006, at 23.03, MicroUser wrote:
> I need sorted result but the way like this:
>
> 0 | Anna
> 3 | Fernando
> 2 | Link
> 1 | Other
>
> Record '1 | Other' must by at the end of query result.
>
> How I can get it?


Well, maybe not the answer you're looking for, but a rather clean way
to do this would be to only store actual names in the table, let your
application do the select and sort, and then add the 'Other' at runtime.

If the 'Other' needs to be stored, perhaps it could be represented
with a NULL value instead? (It's not really a name, just a
placeholder for not knowing, isn't it?)


Sincerely,

Niklas Johansson
Phone: +46-322-108 18
Mobile: +46-708-55 86 90




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

Предыдущее
От: Marcus Engene
Дата:
Сообщение: Re: Discover temporary INDEX/TABLE name
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: Discover temporary INDEX/TABLE name