Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate a running balance
Message
From
16/09/2007 18:27:00
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Calculate a running balance
Miscellaneous
Thread ID:
01254611
Message ID:
01254611
Views:
58
Hi All

I am using Sybase SQLAnywhere database. This database uses T-SQL but probable more compatible with the 2000 version.

I am working a a commission matrix that I need to calculate. The matrix consist of a number of rows that pay different recipients for their portion of the total commission for a sale. I need a way to calculate a remainder of commission for each row until all the commission has been allocated. For example:
Total commission 3000.00  
Recipient		Rate				Amount		Balance
Starting Balance							3000
George			5%				150.00	        2850
Henry			15%				427.50	        2422.50
Jack			70%				1695.75	        726.75
Me 			Remainder	    	        726.75	        0
I know how to do this in VFP but I hope to be able to do this using a stored procedure.

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform