update stck set stockingStatus = , lastupdated = getDate(), lastUpdatedBy = , sourceID = case when sourceID IS NULL THEN else sourceID end, sourceType = case when sourceID IS NULL THEN '102' else sourceType end from tbl_CDR_Stocking stck inner join tbl_PRD_Skus s on s.skuid = stck.skuid where stck.ownerid = and stck.ownerType = and stck.cdr_recordID = and s.mfrid =