Re: ORDER BY 'DK', 'DE', DESC?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: ORDER BY 'DK', 'DE', DESC?
Дата
Msg-id 20040520101818.E17153@megazone.bigpanda.com
обсуждение исходный текст
Ответ на ORDER BY 'DK', 'DE', DESC?  (Victor Spång Arthursson <scooterbabe@home.se>)
Ответы Re: ORDER BY 'DK', 'DE', DESC?  (Adam Ruth <aruth@intercation.com>)
Список pgsql-general
On Tue, 11 May 2004, [ISO-8859-1] Victor Spång Arthursson wrote:

> Hi!
>
> I would like to know if it's possible to give a priority order of how
> to sort the returning rows?
>
> Like for example to order every row with a field language = DK first,
> then the rows with field language = *DE' and last the other languages,
> ordered alphabetically…?

Well, I think you can do something like:

ORDER BY (language = 'DK'), (language = 'DE'), language

(or you could possibly condense the first two into one with case)

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

Предыдущее
От: Victor Spång Arthursson
Дата:
Сообщение: Equivalent for mysql's FOUND_ROWS()
Следующее
От: Adam Ruth
Дата:
Сообщение: Re: ORDER BY 'DK', 'DE', DESC?