Select case

From: "Chad Thompson" <chad(at)weblinkservices(dot)com>
To: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Select case
Date: 2002-10-25 18:59:27
Message-ID: 0fdf01c27c58$a4d2a630$32021aac@chad
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Doug Gorley 2002-10-25 19:04:47 Re: Select case
Previous Message Tom Lane 2002-10-25 16:30:49 Re: Parameters for views based on other views