Hii
Having problem with opening & Closing balance query the closing balance are not getting reflected as opening balance month wise. please help me
screen shot of Table and query are as below
Sql:
SELECT DISTINCT t1.mth, (SELECT (sum(credit - debit)) FROM test AS t2
WHERE t2.mth <= t1.mth) AS op_bal,
Sum(t1.credit) AS Cr, Sum(t1.debit) AS Dr,
Sum((Nz([op_bal])+Nz([credit]))-Nz([debit])) AS cl_bal
FROM test AS t1
GROUP BY t1.mth
ORDER BY t1.mth;
Thank you