Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to do the (Saldo) calculation with a SQL Function where I saved the data (Input, Output) in tblCalculate table.

Input Output Saldo
100 | 50 | 50
100 | 30 | 220
50 | 0 | 270
300 | 400 | 170
Posted
Comments
Henry Minute 12-Nov-10 17:54pm    
Saldo has many meanings. It would help if you edited your question to clarify which one you mean.
DaveAuld 13-Nov-10 8:23am    
Henry, look at the data, he is adding the row sum to the rolling total of previous rows. Now he has got me scratching my head on how to do this.....could be the new TWOTD..

1 solution

Have a read of this page, you should be able to work it out from what they are demonstrating;

http://dev.mysql.com/tech-resources/articles/rolling_sums_in_mysql.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900