Re: How can I simply substatue a value in a query? - Mailing list pgsql-sql

From Bryan Encina
Subject Re: How can I simply substatue a value in a query?
Date
Msg-id 00ab01c57b40$07425c00$8d3710ac@AT10111
Whole thread Raw
In response to How can I simply substatue a value in a query?  (Roy Souther <roy@SiliconTao.com>)
Responses Re: How can I simply substatue a value in a query?
List pgsql-sql
-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Roy Souther
Sent: Monday, June 27, 2005 10:17 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] How can I simply substatue a value in a query?


I want to do a simple substatution of a value in a query. For example I have a boolean field that wil return t or f for
Trueand False. I would like it to return Yes or No. I don't want to have a 2x2 table to look up the output. I don't
wantto use stored procedue. 

I think there is a better way, somthing very simple but I cannot remember what it is.

-------------

I think a CASE statement is what you want.  Check the Conditional Expressions section of the docs at:
http://www.postgresql.org/docs/8.0/interactive/functions-conditional.html
HTH,
Bryan Encina



pgsql-sql by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Re: How can I simply substatue a value in a query?
Next
From: davide
Date:
Subject: Re: How can I simply substatue a value in a query?