如何在sql server中使用存储过程获得期末余额? [英] How to get closing balance using stored procedure in sql server?

查看:94
本文介绍了如何在sql server中使用存储过程获得期末余额?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下表帐户trans:



Below table account trans :

TransID	TransDate	LedgerID	vid	debitamt	creditamt	vouchertype
1	05-Apr-12	3	1	0	1474	SALES INVOICE
2	05-Apr-12	4	1	0	369	SALES INVOICE
3	05-Apr-12	13	1	38703	0	SALES INVOICE
4	05-Apr-12	8	1	0	36860	SALES INVOICE
5	02-Apr-12	70	1	0	8715	PURCHASE VOUCHER
6	02-Apr-12	4	1	8715	0	PURCHASE VOUCHER
7	07-Feb-13	1	1	0	2000	QUICK PAYMENT VOUCHER





如何使用sql server中的存储过程获得期末余额?



How to get closing balance using stored procedure in sql server?

推荐答案

编写存储过程,返回输出参数。阅读此参数以阅读您的应用程序。
Write the Store Proc, that returns the output paramenter. Read this parameter to read in your application.


这篇关于如何在sql server中使用存储过程获得期末余额?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆