From: David Gilbert <dgilbert(at)velocet(dot)ca>
To: pgsql-hackers(at)postgresql(dot)org
Subject:
Date: 1999-09-30 13:17:25
Message-ID: 14323.25317.750866.864553@trooper.velocet.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


OK... doing some serious report hacking... and I decided I wanted to
do this:

select acct_id,
sum(case when recd > ('now'::date - '30 days'::timespan)::date
then amt else 0) as current
from payable where not paid_p group by acct_id order by acct_id;

but pgsql gives me:

ERROR: parser: parse error at or near ")"

Now... I also thought I might be able to contruct
sum(amt * <boolean>), but this also isn't allowed. I think that we
should make an int(boolean) function.

Dave.

--
============================================================================
|David Gilbert, Velocet Communications. | Two things can only be |
|Mail: dgilbert(at)velocet(dot)net | equal if and only if they |
|http://www.velocet.net/~dgilbert | are precisely opposite. |
=========================================================GLO================

Browse pgsql-hackers by date

  From Date Subject
Next Message Ansley, Michael 1999-09-30 13:23:26 RE:
Previous Message Dmitry Samersoff 1999-09-30 12:52:04 RE: [HACKERS] Win32 pЭort of libpq