Re: Sorting by constant values - Mailing list pgsql-general

From Ragnar Hafstað
Subject Re: Sorting by constant values
Date
Msg-id 1115144044.4196.52.camel@localhost.localdomain
Whole thread Raw
In response to Sorting by constant values  (Robert Fitzpatrick <lists@webtent.net>)
List pgsql-general
On Tue, 2005-05-03 at 13:29 -0400, Robert Fitzpatrick wrote:
> I have a column that I want to sort by certain values. The values are
> Unit, Exterior and Common. I want all the records with Unit first,
> Common second and Exterior last in the sort order. These are the only 3
> possible values, is there a way to sort manually like that with the
> alphanumeric values?

... ORDER BY length(col);

:-)
gnari




pgsql-general by date:

Previous
From: Ragnar Hafstað
Date:
Subject: Re: Date addition/subtraction
Next
From: Alvaro Herrera
Date:
Subject: Re: MVCC and insert