---> select distinct customer from tbl_IMPORT_DotDeductions where eai_batchId = and ownerId= and ownerType = and nullif( customer, '' ) is not null select cdr.cdr_recordId, cdr.cdr_dstCompanyType, cdr.cdr_specialAcctType, cdr.cdr_redistAcctFor, dot.cdr_dstCompanyType dot_dstCompanyType, dot.cdr_dstCode dot_dstCode, cdr.fsl_mapPriority from tbl_CDR_Distributors cdr inner join tbl_CDR_Distributors dot on dot.fsl_dstId = cdr.fsl_dstId where dot.ownerId = and dot.fsl_tablecode = and cdr.ownerId = and cdr.fsl_tablecode = and nullif( dot.cdr_dstCode, '' ) is not null and ( dot.cdr_dstCode = or exists ( select * from tbl_CDR_DstCodes dotCodes where dotCodes.ownerId = dot.ownerId and dotCodes.ownerType = dot.fsl_tablecode and dotCodes.cdr_recordId = dot.cdr_recordId and dotCodes.cdr_dstCode = ) ) select * from qmd_distributorLookup where cdr_dstCompanyType <> 'S' order by fsl_mapPriority update tbl_IMPORT_DotDeductions set fseCdrRecordId = where ownerId = and ownerType = and eai_batchId = and customer = select opr.operatorId from tbl_OPR_ClientOperators opr inner join tbl_OPR_ClientOperators dot on dot.fsl_choId = opr.fsl_choId where dot.mfrCustNum = and dot.ownerId = and dot.fsltablecode = and opr.ownerId = and opr.fsltablecode = and coalesce( opr.fsl_choid, 0 ) > 0 select opr.operatorId from tbl_OPR_ClientOperators opr inner join tbl_OPR_ClientOperators dot on dot.fsl_choId = opr.fsl_choId where dot.mfrCustNum = and dot.ownerId = and dot.fsltablecode = and opr.ownerId = and opr.fsltablecode = and coalesce( opr.fsl_choid, 0 ) > 0 update tbl_IMPORT_DotDeductions set fseOperatorId = where ownerId = and ownerType = and eai_batchId = and customer = select eai_importId, eai_lineNumber, fseCdrRecordId, fseOperatorId, dot_inv_nbr, inv_date, ref_nbr, gross_amt from tbl_IMPORT_DotDeductions where ownerId = and ownerType = and eai_batchId = and ( fseCdrRecordId is not null or fseOperatorId is not null ) select claimId, partnerId, partnerType from tbl_TPM_Claims where ownerId = and ownerType = and payeeId = and claimInvoice = and claimRef = and claimDate = update tbl_IMPORT_DotDeductions set fseClaimId = , fseClaimStatus = where ownerId = and ownerType = and eai_batchId = and eai_importId = and eai_lineNumber = select eai_lineNumber, eai_importId, fseCdrRecordId, fseOperatorId, dot_inv_nbr, ref_nbr, inv_date, gross_amt, name, doc_id from tbl_IMPORT_DotDeductions where ownerId = and ownerType = and eai_batchId = and fseClaimStatus = 'A' select claimId from tbl_TPM_Claims where ownerId = and ownerType = and payeeId = and partnerType = 'CDR' and partnerId = and partnerType = 'OPR' and partnerId = and claimInvoice = and claimRef = and claimAmount = update tbl_IMPORT_DotDeductions set fseClaimStatus = 'R' where ownerId = and ownerType = and eai_batchId = and eai_importId = and eai_lineNumber = insert into tbl_TPM_Claims ( createDate, createUserId, updateDate, updateUserId, ownerId, ownerType, payeeId, partnerId, partnerType, claimInvoice, claimDate, claimRef, claimType, claimStatus, statusReasonId, claimAmount, claimDescription ) values ( , -1, , -1, , , , , , , , , , , 'D', 'OPEN', null, , ) update tbl_IMPORT_DotDeductions set fseClaimId = where ownerId = and ownerType = and eai_batchId = and eai_importId = and eai_lineNumber = select customer, name, min( eai_lineNumber ) first_line, count(*) line_count from tbl_IMPORT_DotDeductions where fseCdrRecordId is null and fseOperatorId is null and eai_batchId = and ownerId = and ownerType = group by customer, name order by customer, name select case when nullif( fseClaimId, 0 ) is not null then case when fseClaimStatus = 'A' then 'A - New Claim Added' else 'U - Skipping Already Loaded' end when fseCdrRecordId is null and fseOperatorId is null then 'X - Customer Not Found' when fseClaimStatus = 'R' then 'R - Duplicate Claim' else 'M - Possible Duplicate Claim and/or Customer Mapping Changed' end import_status, eai_lineNumber lineNumber, customer, name, dot_inv_nbr, inv_date, gross_amt, ref_nbr from tbl_IMPORT_DotDeductions where ownerId = and ownerType = and eai_batchId = order by import_status, lineNumber select distinct i.customer dot_customer_nbr, i.name dot_customer_name, cdr.cdr_dstCode mfr_distributor_nbr, cdr.cdr_dstName mfr_distributor_name, t.name mfr_territory from tbl_IMPORT_DotDeductions i inner join tbl_CDR_Distributors cdr on cdr.cdr_recordId = i.fseCdrRecordId and cdr.ownerId = i.ownerId and cdr.fsl_tablecode = i.ownerType left outer join tbl_TER_Territories t on t.territoryId = cdr.cdr_territoryId and t.ownerId = cdr.ownerId and t.fsl_tablecode = cdr.fsl_tablecode where i.ownerId = and i.ownerType = and i.eai_batchId = order by dot_customer_name select lineCount from tbl_EAI_inboundBatches where batchId =

#htmleditformat( qmd_batch.fileFormat )# Results

Imported #qmd_stats.lineCount# into #_fileFormat.stagingTable#

Nothing was done with this data

--->