>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
>
>Hi,
>
>I refer to my earlier thread of wanting a running balance for debit and credit fields. I thank Borislav for the code he sent to me . However,the code works well if the running balance is for a particular date. But if there are many entries for a single date, all the running totals for a particular date period remain the same, even though the individual values of debit and credit are different. I would like to know how to get a running total based on the record number, and not the date.
>
>Thanks,
>
>
>
>Regards,
>
>Steve.
No way if you don't have some other field that can be used in the query. Other way it to make your field DateTime and store actial time when the user makes His/Her input.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.