Preview Mode

Apply Mode

select distinct c.ownerId, c.ownerType, c.claimId, opr.fsl_choId, pod.distributorName from tbl_TPM_Claims c with (nolock) inner join tbl_OPR_CLientOperators opr with (nolock) on opr.ownerId = c.ownerId and opr.fsltablecode = c.ownerType and opr.operatorId = c.partnerId and opr.fsl_choId > 0 inner join tbl_TPM_ProofOfDelivery pod with (nolock) on pod.claimId = c.claimId and pod.ownerId = c.ownerId and pod.ownerType = c.ownerType where c.ownerId = 288 and c.ownerType ='MFR' and c.partnerType = 'OPR' and nullif( pod.distributorName, '' ) is not null and pod.cdrRecordId is null select distinct objectId, objectType from tbl_MDM_Aliases with (nolock) where sourceType = 'CHO' and sourceId = and masterDataType = 'DISTRIBUTOR' and aliasText = select distinct objectId, objectType from tbl_MDM_Aliases with (nolock) where sourceType = 'CHO' and masterDataType = 'DISTRIBUTOR' and aliasText = select cdr.cdr_recordId from tbl_CDR_Distributors cdr where cdr.ownerId = and cdr.fsl_tablecode = and cdr.fsl_dstId = and cdr.cdr_dstCompanyType = 'B' order by cdr.fsl_mappriority update tbl_TPM_ProofOfDelivery set cdrRecordId = where ownerId = 288 and ownerType = 'MFR' and claimId = and distributorName = and cdrRecordId is null select c.claimId, c.readyToAudit, c.readyTOClear, c.claimStatus from tbl_TPM_Claims c with (nolock) where c.ownerId = 288 and c.ownerType = 'MFR' and not exists ( select * from tbl_TPM_ProofOfDelivery epod where epod.ownerId = c.ownerId and epod.ownerType = c.ownerType and epod.claimId = c.claimId and epod.cdrRecordId is null ) and c.claimId in ( ) select distinct distributorName from qmd_missingDistributors select distinct distributorName from qmd_missingDistributors where cdrRecordId > 0 select distinct distributorName, dstId, cleanDistributorName, reason from qmd_missingDistributors where cdrRecordId is null

#lsnumberformat( qmd_distributorsToResolve.recordCount )# Missing Distributors

#lsnumberformat( qmd_resolvedDistributors.recordCount )# Resolved

#lsnumberformat( qmd_unresolvedDistributors.recordCount )# Unresolved Distributors