Wednesday, 2 October 2013

Counting the total number of transactions returned by the Stock Audit Report

To determine the total number of records returned by the Inventory Audit  Report for all the items and warehouses without any specific date run the following query:

SELECT count(*)
  FROM [dbo].[OINM] T0

  INNER  JOIN [dbo].[OITM] T1 ON T1.[ItemCode] = T0.[ItemCode]
WHERE (T0.[TransValue] <> 0 OR 

       T0.[InQty] <> 0 OR
       T0.[OutQty] <> 0 OR 
       T0.[TransType] = 162)

No comments:

Post a Comment