>>SELECT Gl.grpcode, Accgroup.grpname, Gl.accno, Gl.macc, Gl.fsacc, Gl.ssacc,; >> Gl.tsacc, Gl.desc, Subtrn.debit, Subtrn.credit, ; > IIF(Subtrn.debit-Subtrn.credit>0,Subtrn.debit-Subtrn.credit,0000000000) as balancedebit, ; >> IIF(Subtrn.credit-Subtrn.debit>0,Subtrn.credit-Subtrn.debit,0000000000) as balancecredit ; >> FROM accgroup,gl,subtrn,trans ; >> where Gl.grpcode = Accgroup.grpcode ; >> and Subtrn.srno = Trans.srno ; >> and Gl.accno = Subtrn.accno; >> and Trans.trdate >=mdate1 and Trans.trdate <=mdate2 ; >> ORDER BY Accgroup.grpcode,Gl.accnoExactly what I would have said, but you were faster. Actually, I think 0000000000.00 would be better, because this is finances and they want it precise to the last penny (so they can get away with the millions easier :).