Subject | RE: [firebird-support] newbie question |
---|---|
Author | Gert Coetzee |
Post date | 2004-11-17T13:27:51Z |
Thanx it is working.
-----Original Message-----
From: Frank Schlottmann-Goedde
[mailto:frank.schlottmann-goedde@...]
Sent: Wednesday, November 17, 2004 14:42 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] newbie question
Gert Coetzee wrote:
when (TempCashup.ORIGINAL = '1') then TempCashup.Amount
else 0
end
)
AS InvAmt,
when (TempCashup.Original ='1') then (cast TempCashup.IDate as
char(10))
else 'xxxxxxx'
end
)
AS Date1
Frank
--
"Fascinating creatures, phoenixes, they can carry immensely heavy loads,
their tears have healing powers and they make highly faithful pets."
- J.K. Rowling
Yahoo! Groups Links
-----Original Message-----
From: Frank Schlottmann-Goedde
[mailto:frank.schlottmann-goedde@...]
Sent: Wednesday, November 17, 2004 14:42 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] newbie question
Gert Coetzee wrote:
> How would I do this in Firebird ?You may try sth. like this:
> SELECT TempCashup.MatchingRef AS Ref,case
> Sum(
when (TempCashup.ORIGINAL = '1') then TempCashup.Amount
else 0
end
)
AS InvAmt,
> Sum(TempCashup.Amount) AS Outstanding,case
> Min(
when (TempCashup.Original ='1') then (cast TempCashup.IDate as
char(10))
else 'xxxxxxx'
end
)
AS Date1
> FROM TempCashup'D')
> GROUP BY TempCashup.MatchingRef, TempCashup.DC, TempCashup.Account
> HAVING (((Sum(TempCashup.Amount)) >= 0.01) AND ((TempCashup.DC) =
> ANDit's untested.
> ((TempCashup.Account)= 'PIT' ))
> ORDER BY TempCashup.MatchingRef;
Frank
--
"Fascinating creatures, phoenixes, they can carry immensely heavy loads,
their tears have healing powers and they make highly faithful pets."
- J.K. Rowling
Yahoo! Groups Links