Syteline Material Transaction
标签:
SQL Server
做Syteline System维护,用户特多要求,今天需要为用户修改一个Material Transaction Report. 具体实现如下,可以参考:
代码
CREATE PROCEDURE [dbo].[usp_SyteLine_GetMaterialTransactionsReport]
(
@ConditionExpression nvarchar(3000)
)
AS
DECLARE @sql nvarchar(4000) = 'SELECT mt.[trans_num] AS [Trans Number] ,mt.[trans_date] AS [Trans Date],mt.[item] AS [Item],i.[description] AS [Description],mt.[qty] AS [Quantity],i.[u_m] AS [U/M],mt.[cost] AS [Cost],mt.[reason_code] AS [Reason Code]
FROM [dbo].[matltran] mt
LEFT JOIN [dbo].[item] i ON (mt.[item] = i.[item])'
IF LEN(@ConditionExpression) > 0
SELECT @sql += ' WHERE ' + @ConditionExpression
EXECUTE(@sql)
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦