CREATE PROCEDURE Reset_Failed_Processing_Vendor_Records AS UPDATE ztV SET ztV.zReadyForReview = NULL, ztV.zReadyForReviewOn = NULL, ztV.zConfirmed = NULL, ztV.zConfirmedOn = NULL, ztV.zConfirmedBy= NULL FROM dbo.ztVenDedup AS ztV INNER JOIN dbo.Vendor_Failure_Groups AS Ven ON Ven.partner1=ztV.PARTNER AND Ven.zCheckWithinGroup=ztV.zCheckWithinGroup
UPDATE ztV SET ztV.zField05 = Ven.Updated_Value FROM dbo.ztStructureCleansing AS ztV INNER JOIN dbo.Address_Cleansing_Fix2 AS Ven ON Ven.Keyfield=ztV.Keyfield WHERE Ven.Field_to_be_updated = 'zfield05' AND ztV.zObject = Ven.[SOURCE]