Re: order by question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
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 14:26:11
Message-ID: 20050309142611.GB32013@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Mar 09, 2005 at 12:41:55 +0000,
Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk> wrote:
> 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.

Are you sure? It looks like you are going to have them appear at the bottom
of the list doing the above. Remember that false sorts before true.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Stark 2005-03-09 15:50:08 Re: order by question
Previous Message Richard Huxton 2005-03-09 14:19:45 Re: Table like a field