From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: order by question |
Date: | 2005-03-09 13:48:38 |
Message-ID: | Pine.LNX.4.44.0503091548050.16906-100000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Gary Stainburn | 2005-03-09 14:06:11 | Re: order by question |
Previous Message | lucas | 2005-03-09 13:46:16 | Table like a field |