如何使用MySql查询或过程获得期初余额? [英] How to get the opening balance with the use of a MySql query or procedure?
本文介绍了如何使用MySql查询或过程获得期初余额?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为"account_trans"的表,其中有诸如日期,贷方,借方,公司代码,帐户代码之类的字段.
在报告中,用户将输入Date-1到Date-2,因此它必须计算每个日期的期初余额.我该怎么做?
I have a table called "account_trans", and in that, there are fields like date, credit, debit, company code, account code.
In a report, the user will input Date-1 to Date-2, so it must calculate the opening balance of each and every date. How can I do this?
推荐答案
它不是特定于mySql的,但也许会有所帮助, ^ ]
It''s not specific to mySql but maybe this will help, http://www.sqlteam.com/article/calculating-running-totals[^]
这篇关于如何使用MySql查询或过程获得期初余额?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文