Re: order by question

Поиск
Список
Период
Сортировка
От Achilleus Mantzios
Тема Re: order by question
Дата
Msg-id Pine.LNX.4.44.0503091548050.16906-100000@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на order by question  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Список pgsql-sql
O Gary Stainburn έγραψε στις Mar 9, 2005 :

> Hi folks.
> 
> I seem to remember somewhere being shown how to bump specific rows to 
> the top of a list; something along the lines of:
> 
> select c_id as key, c_des as value from customers order by c_id = 7, 
> c_id = 160, value;

use the 
case ... when .. then ... when ... then ... else ...
construct.
> 
> however, although the statement is accepted the two rows specified are 
> not bumped to the top of the list, but instead appear in their correct 
> position in the order by value part.
> 
> Is it possible and if so how do I do it?
> 

-- 
-Achilleus



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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: order by question
Следующее
От: lucas@presserv.org
Дата:
Сообщение: Table like a field