order by question

From: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
To: pgsql-sql(at)postgresql(dot)org
Subject: order by question
Date: 2005-03-09 12:41:55
Message-ID: 200503091241.55881.gary.stainburn@ringways.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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;

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?
--
Gary Stainburn

This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2005-03-09 13:06:26 Re: order by question
Previous Message KÖPFERL Robert 2005-03-09 10:39:01 Re: [SQL] Postgres schema comparison.