I use this syntax to retrieve data and separate a single money column into a debit and credit column. This works well except that it displays values in a column without a corresponding valid value. Like if for my CASH account I have a DEBIT amount and nothing for my CREDIT amount, a value is displayed on the CREDIT column. Is there a command I can use within this syntax so that instead of displaying a zero (0) value will be displayed instead?
Thanx!
Martin
SQL Commands: Select t2.AcctID, t2.IDNo, t1.Nme, (Select Sum(Amount) From zTemp2 Where zTemp2.AcctID=t2.AcctID and zTemp2.IDNo = t2.IDNo and zTemp2.Amount>0) Debit, (Select Sum(Amount) From zTemp2 Where zTemp2.AcctID=t2.AcctID and zTemp2.IDNo = t2.IDNo and zTemp2.Amount<0) Credit, sum(t2.Amount) Amount From zTemp2 t2 inner join zTemp1 t1 on t2.IDNo = t1.IDNo Group By t1.Nme, t2.IDNo, t2.AcctID Order By t1.Nme, t2.AcctID