跳至主要內容

按照物料查询仓库库存(模糊查找)

五六零网校小于 1 分钟

示例代码

SELECT T0.[ItemCode], T0.[ItemName], T0.[FrgnName], T1.[OnHand], T1.[IsCommited] AS '已下销售订单'
	, T1.[OnOrder] AS '已下采购订单'
FROM OITM T0
	INNER JOIN OITW T1 ON T0.[ItemCode] = T1.[ItemCode]

WHERE T1.[WhsCode] =' [%4]'
	AND (T0.[ItemCode] LIKE '%%[%1]%%'
		OR '[%1]' = '')
	AND (T0.[ItemName] LIKE '%%[%2]%%'
		OR '[%2]' = '')
	AND T1.[OnHand] > 0