如何从借方和贷方列计算运行总计 [英] How to calculate running totals from debit and credit columns
本文介绍了如何从借方和贷方列计算运行总计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在表A中有这些数据
供应商借记卡信用额。日期
A 60 1-3-2014
B 45 2-3-2014
A 10 3-3-2014
C 42 4-3-2014
我想用视图达到以下效果
供应商借方贷方余额转额。日期
A 60 60 1-3-2014
B 45 15 2-3-2014
A 10 25 3-3-2014
C 42 -17 4-3-2014
我需要帮助。
解决方案
请参阅此处:在SQL Server中计算简单运行总计 [ ^
I have this data in TABLE A
Supplier Debit Credit Tran. Date
A 60 1-3-2014
B 45 2-3-2014
A 10 3-3-2014
C 42 4-3-2014
and I want achieve the following results using a view
Supplier Debit Credit Balance Tran. Date
A 60 60 1-3-2014
B 45 15 2-3-2014
A 10 25 3-3-2014
C 42 -17 4-3-2014
Pls I need help.
解决方案
See here: Calculating simple running totals in SQL Server[^]
这篇关于如何从借方和贷方列计算运行总计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文