Hello,
I'm trying to make a study for the alteration successful quantity made connected a BoM.
SELECT
T0.Code,
T1.Code,
T1.Quantity 'Current Qty',
T2.Quantity 'Old Qty',
T1.LogInstanc,
T2.LogInstanc,
T0.UpdateDate,
T3.USER_CODE 'Updated By'
FROM OITT T0
INNER JOIN ITT1 T1 ON T0.Code = T1.Father
INNER JOIN ATT1 T2 ON T2.Code = T1.Code
INNER JOIN OUSR T3 ON T3.USERID = T0.UserSign2
WHERE
T0.Code = '10596860'AND
DATEDIFF(DD,T0.UpdateDate, GETDATE()) <=1
AND T1.Quantity <> T2.Quantity
This study gives maine aggregate lines (I tin spot based connected the T2.loginstance) and I would similar to spot lone the latest alteration to the quantity made.
Also, however to get the details of components added oregon removed from the ITT1 Table?
Any assistance would beryllium appreciated.
Regards,
Joseph