Hi
May I suggest the code given to me by Borrislav Borrisov to encounter a similar problem of a runnig total required on a cursor having date,debit,credit, and running total as the final fields:
The code is as follows:
SELECT Date, Debit, Credit,;
NVL(SELECT SUM(Credit-Debit) FROM MyTable Tbl1 WHERE Tbl1.Date < MyTable.Date), CAST(0 AS N(12,2)) AS Balance;
FROM MyTable
I hope this helps.
Regards,
Steve.