Ted Roche wrote:
On 7/12/07, Kevin Cully [EMAIL PROTECTED] wrote:
SELECT cType, nItemTotal, CASE WHEN UPPER(cType)='EXPENSE', THEN
nItemTotal ELSE 0.0 END as nExpTotal FROM MySchema.MyTable WHERE
dCreate
= current_date - 365 ORDER BY cType
No, that's fugly. I'd change it to:
SELECT
I'm trying convert a VFP SQL Select statement over to run under
PostgreSQL, and I'm not finding the replacement for IIF. Any tips?
-Kevin
CULLY Technologies, LLC
Sponsor of FoxForward 2007
foxforward.net
___
Post Messages to: ProFox@leafe.com
On Jul 12, 2007, at 1:55 PM, Kevin Cully wrote:
I'm trying convert a VFP SQL Select statement over to run under
PostgreSQL, and I'm not finding the replacement for IIF. Any tips?
Use the CASE structure:
http://pgsqld.active-venture.com/functions-conditional.html#AEN9698
-- Ed Leafe
Grrr. I found something right after sending the email ... but can this
be the best solution?
SELECT cType, nItemTotal, CASE WHEN UPPER(cType)='EXPENSE', THEN
nItemTotal ELSE 0.0 END as nExpTotal FROM MySchema.MyTable WHERE dCreate
= current_date - 365 ORDER BY cType
-Kevin
CULLY Technologies,
On 7/12/07, Kevin Cully [EMAIL PROTECTED] wrote:
SELECT cType, nItemTotal, CASE WHEN UPPER(cType)='EXPENSE', THEN
nItemTotal ELSE 0.0 END as nExpTotal FROM MySchema.MyTable WHERE dCreate
= current_date - 365 ORDER BY cType
No, that's fugly. I'd change it to:
SELECT cType, nItemTotal,
5 matches
Mail list logo