SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
--=================================================================
-- 描述:~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 作者:鲁湘
-- @tableName 该模板对应的数据库表
-- @RecordID 业务处理需要寻找表中记录的ID号码
--=================================================================
ALTER PROCEDURE WF_QingJia
(@tableName varchar(50),@recordID varchar(50))
AS
-- 获取表中的业务数据值
DECLARE @money varchar(100), -- 业务逻辑需要的值
@sqls nvarchar(4000) -- 保存组合SQL语句
SET @sqls='SELECT @a=Money FROM '+@tableName +' WHERE ID ='+@recordID
EXECUTE sp_executesql @sqls,N'@a varchar(50) output',@money output
-- 根据值进行相应的业务处理
print @money
UPDATE WF_FormBill SET [Money]='真的被处理了' WHERE [ID]=@recordID
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO