Re: order by question - Mailing list pgsql-sql

From Achilleus Mantzios
Subject Re: order by question
Date
Msg-id Pine.LNX.4.44.0503091548050.16906-100000@matrix.gatewaynet.com
Whole thread Raw
In response to order by question  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
List 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 by date:

Previous
From: Richard Huxton
Date:
Subject: Re: order by question
Next
From: lucas@presserv.org
Date:
Subject: Table like a field