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

From Scott Marlowe
Subject Re: Sorting by constant values
Date
Msg-id 1115142799.13303.1502.camel@state.g2switchworks.com
Whole thread Raw
In response to Sorting by constant values  (Robert Fitzpatrick <lists@webtent.net>)
List pgsql-general
On Tue, 2005-05-03 at 12:29, 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?

case statement should work.

http://www.postgresql.org/docs/8.0/static/functions-conditional.html

pgsql-general by date:

Previous
From: Arcane_Rhino
Date:
Subject: unsubscribe
Next
From: Scott Marlowe
Date:
Subject: Re: Date addition/subtraction