想请教各位,有如下的过程,我现在要写个过程,得到其中 @AMOUNT 金额的值并跟别的数据进行相加,请问获取?
ALTER PROCEDURE [dbusrpub].[DELAY$SP_GETDELAYINFO]
@CONTNO AS varchar(20) , --编号
@JKDATE AS date , --缴款日期
@PAYDATE AS date , --付款日期
@CCCODE AS varchar(20) , --费用项目
@JSAMOUNT AS decimal(12,4) ,--结算金额
@SDATE AS date output, --起征日
@AMOUNT AS decimal(12,2) output, --金额
@cccode_znj AS varchar(20) OUTPUT, --费用代码
@jzrq AS DATE OUTPUT , --记账日期
@zhjl AS DECIMAL(12,4) OUTPUT
AS
BEGIN
END
------解决方案--------------------
try this,
DECLARE @CCCODE varchar(20) = '03';
DECLARE @JSAMOUNT DECIMAL(12,4) = 720.0000;
DECLARE @aa DATE
DECLARE @bb DECIMAL(12,4)
DECLARE @cc varchar(20)
DECLARE @dd DATE
DECLARE @ee DECIMAL(12,4)
declare @currenttime datetime=getdate()
exec dbusrpub.DELAY$SP_GETDELAYINFO '23457',null,@currenttime,@CCCODE,@JSAMOUNT,@SDATE = @aa OUTPUT,@AMOUNT = @bb output,@cccode_znj =@cc output,@jzrq = @dd output,@zhjl = @ee output
select @aa ,@bb ,@cc ,@dd ,@ee