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
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, n
I was afraid that you were going to say that.Thanks.
-Kevin
CULLY Technologies, LLC
Sponsor of FoxForward 2007
foxforward.net
Ed Leafe wrote:
> Use the CASE structure:
>
> http://pgsqld.active-venture.com/functions-conditional.html#AEN9698
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, L
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
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
Subscr
6 matches
Mail list logo