Re: Sorting by constant values

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Sorting by constant values
Дата
Msg-id 1115142799.13303.1502.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Sorting by constant values  (Robert Fitzpatrick <lists@webtent.net>)
Список 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 по дате отправления:

Предыдущее
От: Arcane_Rhino
Дата:
Сообщение: unsubscribe
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Date addition/subtraction