库存过账报表--模糊查询
小于 1 分钟
代码示例
SELECT T0.[DocNum], T0.[FinncPriod], T1.[ItemCode], T1.[ItemName], T2.[FrgnName]
, T1.[Price], T1.[DocTotal], T1.[InvntryUom], T1.[CountDate], T1.[BinEntry]
, T1.[CountQty], T1.[Quantity], T1.[OnHandBef], T1.[Remark]
FROM (OIQR T0, IQR1 T1)
INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode]
INNER JOIN OITB T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
WHERE (T1.[ItemCode] LIKE '%%[%0]%%'
OR '[%0]' = '')
AND (T2.[FrgnName] LIKE '%%[%3]%%'
OR '[%3]' = '')
AND (T0.[CountDate] LIKE '%%[%4]%%'
OR '[%4]' = '')
AND (T3.[ItmsGrpNam] LIKE '%%[%5]%%'
OR '[%5]' = '')
AND (T1.[ItemCode] LIKE '%%[%6]%%'
OR '[%6]' = '')
AND (T0.[DocNum] LIKE '%%[%7]%%'
OR '[%7]' = '')
AND (T1.[WhsCode] LIKE '%%[%8]%%'
OR '[%8]' = '')
AND (T0.[FinncPriod] LIKE '%%[%9]%%'
OR '[%9]' = '')