Select case

Поиск
Список
Период
Сортировка
От Chad Thompson
Тема Select case
Дата
Msg-id 0fdf01c27c58$a4d2a630$32021aac@chad
обсуждение исходный текст
Ответы Re: Select case  (Doug Gorley <douggorley@shaw.ca>)
Список pgsql-novice
I want to be able to change the results that are output from a query like so.
 
select field
from table
if field = 'Stuff' then 'Junk'
elseif field  = 'Crap' then 'Darn'
 
Since I am not quite sure what to look for, I have been unable to find anything in the docs.  Select case doesnt seem to do what I want, but maybe I just dont understand.
 
Thanks
Chad

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Parameters for views based on other views
Следующее
От: Doug Gorley
Дата:
Сообщение: Re: Select case