Subject Re: [firebird-support] newbie question
Author Gert Coetzee
I am currently converting an access system to Firebird 1.51 using
Delphi 7. My current query in access are as follows:

SELECT TempCashup.MatchingRef AS Ref,
Sum(IIf(TempCashup.OREGINAL = '1',TempCashup.Amount,0) ) AS InvAmt,
Sum(TempCashup.Amount) AS Outstanding,
Min(IIf(TempCashup.Original ='1',Str(TempCashup.IDate),'xxxxxxx')) AS
Date1
FROM TempCashup
GROUP BY TempCashup.MatchingRef, TempCashup.DC, TempCashup.Account
HAVING (((Sum(TempCashup.Amount)) >= 0.01) AND ((TempCashup.DC) = 'D')
AND
((TempCashup.Account)= 'PIT' ))
ORDER BY TempCashup.MatchingRef;

How would I do this in Firebird ?
Would I use a stored procedure and if so, what would the script look
like ?

thx.



[Non-text portions of this message have been removed]