Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating in a scan...endscan
Message
From
02/10/2006 09:27:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01158457
Message ID:
01158533
Views:
21
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform