select c.ownerId, c.ownerType, c.claimId, r.contractId from tbl_TPM_Claims c with (nolock) left outer join tbl_TPM_ClaimContracts cc with (nolock) on cc.ownerId = c.ownerId and cc.ownerType = c.ownerType and cc.claimId = c.claimId left outer join tbl_TPM_Requests r with (nolock) on r.requestId = cc.requestId and r.ownerId = cc.ownerId and r.ownertype = cc.ownerType inner join tbl_OPR_ClientOperators opr with (nolock) on opr.operatorId = c.partnerId and opr.ownerId = c.ownerId and opr.fsltablecode = c.ownerType and 'OPR' = c.partnerType where c.ownerId = 276 and c.ownertype = 'MFR' and c.claimDate = and c.claimRef = and c.claimInvoice = and c.claimAmount = and opr.companyName =
#currentRow#. Not Found: #_claimant#, #_claimDate#, #_claimRef#, #_claimInvoice#, #_claimAmount#
select distinct ownerId, ownerType, claimId from qmd_claims
#currentRow#. Multiple Found: #_claimant#, #_claimDate#, #_claimRef#, #_claimInvoice#, #_claimAmount#
select distinct ownerId, ownerType, contractId from qmd_claims where contractId > 0 delete from tbl_TPM_ProofOfDelivery where ownerId = and ownerType = and claimId = delete from tbl_TPM_ClaimContracts where ownerId = and ownerType = and claimId = delete from tbl_TPM_Claims where ownerId = and ownerType = and claimId = delete from tbl_TPM_ReconciliationHistory where ownerId = and ownerType = and claimId = delete from tbl_TPM_CheckRequests where ownerId = and ownerType = and claimId = update tbl_TPM_Contracts set flaggedForRecalc = 'Y', flaggedForRecalcTime = where ownerId = and ownerType = and contractId =