From: | "Bryan Encina" <bryan(dot)encina(at)valleypres(dot)org> |
---|---|
To: | "'Roy Souther'" <roy(at)SiliconTao(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: How can I simply substatue a value in a query? |
Date: | 2005-06-27 17:45:36 |
Message-ID: | 00ab01c57b40$07425c00$8d3710ac@AT10111 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of Roy Souther
Sent: Monday, June 27, 2005 10:17 AM
To: pgsql-sql(at)postgresql(dot)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 True and 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 want to 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
From | Date | Subject | |
---|---|---|---|
Next Message | davide | 2005-06-27 18:18:02 | Re: How can I simply substatue a value in a query? |
Previous Message | Jim Buttafuoco | 2005-06-27 17:35:07 | Re: How can I simply substatue a value in a query? |