declare @TODAY CHAR(10)
SET @TODAY = (SELECT
CONVERT(VARCHAR(10), GETDATE(), 101) AS [MM/DD/YYYY])
UPDATE ICFSS
SET ISSUES_MTD = (ISSUES_MTD + PHYSICALINV.NEW_QTY), ISSUES_YTD = (ISSUES_YTD + PHYSICALINV.NEW_QTY),
ON_HAND_QTY = (ON_HAND_QTY + PHYSICALINV.QTY_VAR), DATE_LAST_ISSUE = @TODAY, DATE_LAST_ACT = @TODAY, OPERATOR_ID = 'SYS.CD',
TIME_LAST_UPDT = convert(char(5),getdate(),108), DATE_LAST_UPDT = convert(char(11),getdate(),101)
FROM PHYSICALINV PI, ICFSS SS
WHERE (PI.Stores_Code = SS.STORES_CODE) AND (PI.Part_ID = SS.PART_ID) AND (SS.PART_ID= '100-001135') AND (PI.QTY_VAR < 0)
|