select r.ownerId, r.ownerType, r.promoNbr, r.requestId, r.contractId from tbl_TPM_Contracts ct with (nolock) left outer join tbl_TPM_Requests r with (nolock) on r.ownerId = ct.ownerId and r.ownerType = ct.ownerType and r.contractId = ct.contractId where ct.ownerId = and ct.ownerType = --and r.promoNbr = '1094001.ZA.001' and r.promoNbr in ( --SELECT AGREEMENT + '.' + REPLICATE(0, 3-len(version )) + cast(version as varchar(20)) SELECT promoNbr FROM z_SCRUM_47309 ) select * from tbl_TPM_Requests where ownerId = and ownerType = and contractId = update z_SCRUM_47309 set TPM_Requests = where promoNbr = select * from tbl_TPM_Contracts where ownerId = and ownerType = and contractid = update z_SCRUM_47309 set TPM_ClaimContracts = where promoNbr = select * from tbl_MFR_TPF_Detail_MFR1 where mfr_Id = and rebateContractId = update z_SCRUM_47309 set MFR_TPF_Detail = where promoNbr =