select resultsText from tbl_EAI_inboundBatches where batchId = and ownerId = and ownerType = #qmd_batchResults.resultsText#
Processing as Claims
Processing as Purchasing
---> update tbl_IMPORT_ContractedOperatorPurchasing set cases = volumeQty where ownerType = and ownerId = and eai_batchid = and volumeUOM in ( 'CA', 'CS', 'CASE', 'CASES' ) and volumeQty is not null and cases is null update tbl_IMPORT_ContractedOperatorPurchasing set lbs = volumeQty where ownerType = and ownerId = and eai_batchid = and volumeUOM in ( 'LB', 'LBS', 'POUNDS', 'POUND' ) and volumeQty is not null and lbs is null select client_code, client_name, sum( cases ) cases, sum( lbs ) lbs from tbl_IMPORT_ContractedOperatorPurchasing with (nolock) where ownerType = and ownerId = and eai_batchid = group by client_code, client_name select mfr_id from tblManufacturers where mfr_code = mfr_name = and mfr_id = update tbl_IMPORT_ContractedOperatorPurchasing set fseMFRId = where ownerType = and ownerId = and eai_batchid = select distinct delivery_period_start_date from tbl_IMPORT_ContractedOperatorPurchasing with (nolock) where ownerId = and ownerType = and eai_batchId = and delivery_period_start_date is not null update tbl_IMPORT_ContractedOperatorPurchasing set delivery_period_end_date = where ownerId = and ownerType = and eai_batchId = and delivery_period_start_date = and delivery_period_end_date is null select distinct payee_type, coalesce( client_distributor_id, '' ) client_distributor_id, coalesce( client_distributor_name, '' ) client_distributor_name from tbl_IMPORT_ContractedOperatorPurchasing with (nolock) where ownerId = and ownerType = and eai_batchId = and nullif( client_distributor_id, '' ) is not null and payee_type in ( 'DISTRIBUTOR', 'OPERATOR' ) and payee_type in ( 'DISTRIBUTOR', 'LOCATION' ) select distinct cdr.crmActive, cdr.cdr_recordId, cdr.cdr_territoryId, cdr.cdr_dstName, coalesce( dst.dstParentCo, 0 ) dstParentCo from tbl_CDR_Distributors cdr with (nolock) inner join tbl_CDR_DstCodes cdrc with (nolock) on cdrc.cdr_recordId = cdr.cdr_recordId and cdrc.ownerid = cdr.ownerId and cdrc.ownerType = cdr.fsl_tablecode left outer join tbl_DST_Distributors dst with (nolock) on dst.dstId = cdr.fsl_dstId where ( cdr.cdr_dstcompanytype = 'B' or cdr.cdr_dstCompanyType = 'R' ) and cdr.ownerId = and cdr.fsl_tablecode = and cdr.fsl_dstId > 0 and LTRIM(RTRIM(SUBSTRING(cdrc.cdr_dstCode, (PATINDEX('%[^0]%', cdrc.cdr_dstCode)), 30))) = update tbl_IMPORT_ContractedOperatorPurchasing set fseCdrRecordId = , fseParentDstId = where client_distributor_id = and eai_batchId = and ownerId = and ownerType = and fseCdrRecordId is null and payee_type = select distinct cdr.crmActive, cdr.cdr_recordId, cdr.cdr_territoryId, cdr.cdr_dstName from tbl_CDR_Distributors cdr with (nolock) inner join tbl_CDR_DstCodes cdrc with (nolock) on cdrc.cdr_recordId = cdr.cdr_recordId and cdrc.ownerid = cdr.ownerId and cdrc.ownerType = cdr.fsl_tablecode where cdr.cdr_dstcompanytype = 'O' and cdr.ownerId = and cdr.fsl_tablecode = and LTRIM(RTRIM(SUBSTRING(cdrc.cdr_dstCode, (PATINDEX('%[^0]%', cdrc.cdr_dstCode)), 30))) = update tbl_IMPORT_ContractedOperatorPurchasing set fseCdrRecordId = , fseParentDstId = -1 where client_distributor_id = and eai_batchId = and ownerId = and ownerType = and fseCdrRecordId is null and payee_type = update i set location_address = dst.dstName + ' Acct ' + case when len( location_customer_nbr ) = 6 then dst.dstBranchId + '-' + location_customer_nbr else location_customer_nbr end, location_city = dst.dstCity, location_state = dst.dstState, location_zipcode = dst.dstZip, location_customer_nbr = case when len( location_customer_nbr ) = 6 then dst.dstBranchId + '-' + location_customer_nbr else location_customer_nbr end from tbl_IMPORT_COntractedOperatorPurchasing i inner join tbl_CDR_Distributors cdr with (nolock) on cdr.cdr_recordId = i.fseCdrRecordId and cdr.ownerId = i.ownerId and cdr.fsl_tablecode = i.ownerType inner join tbl_DST_Distributors dst with (nolock) on dst.dstId = cdr.fsl_dstId and dst.dstParentCo = 4036 where i.ownerId = and i.ownerType = and i.eai_batchId = and nullif( i.location_address, '' ) is null and nullif( i.location_city, '' ) is null and nullif( i.location_state, '' ) is null and nullif( i.location_zipCode, '' ) is null update tbl_IMPORT_ContractedOperatorPurchasing set fseTraceHash = convert( varchar(100), hashbytes( 'SHA2_256', convert( varchar, coalesce( fseCdrRecordId, 0 ) ) + coalesce( location_customer_nbr, 'blank' ) + coalesce( nullif( location_name, '' ), 'blank' ) + coalesce( nullif( location_address, '' ), 'blank' ) + coalesce( nullif( location_city, '' ), 'blank' ) + coalesce( nullif( location_state, '' ), 'blank' ) + coalesce( nullif( location_zipcode, '' ), 'blank' )), 2) from tbl_IMPORT_ContractedOperatorPurchasing with (nolock) where ownerId = and ownerType = and eai_batchId = with operators as ( select distinct cdr.cdr_dstCode as primary_distributor_id, 'OPR' rec_type, location_customer_nbr as primary_distrib_acctnbr, location_name as company_name, location_address as company_address1, location_city as company_city, location_state as company_state, location_zipcode as company_zip, 'D' as company_priority, pod.delivery_period_end_date, pod.fseTraceHash from tbl_IMPORT_ContractedOperatorPurchasing pod with (nolock) inner join tbl_CDR_DstCodes cdr with (nolock) on cdr.cdr_recordId = pod.fseCdrRecordId and cdr.ownerId = pod.ownerId and cdr.ownerType = pod.ownerType and cdr.cdr_dstCode_type = 'M' and cdr.cdr_dstCode <> '' inner join tbl_CDR_Distributors cdrcdr with (nolock) on cdrcdr.ownerId = cdr.ownerId and cdrcdr.fsl_tablecode = cdr.ownerType and cdrcdr.cdr_recordId = cdr.cdr_recordId left outer join tbl_DST_Distributors dst with (nolock) on dst.dstId = cdrcdr.fsl_dstId where pod.eai_batchId = and pod.ownerId = and pod.ownerType = and nullif( pod.location_name, '' ) is not null and ( 1 = 2 -- full address or ( nullif( pod.location_city, '' ) is not null and nullif( pod.location_state, '' ) is not null and nullif( pod.location_address, '' ) is not null and nullif( pod.location_zipcode, '' ) is not null ) -- with distributor assigned customer number or nullif( location_customer_nbr, '' ) is not null ) ) select primary_distributor_id, rec_type, primary_distrib_acctnbr, company_name, company_address1, company_city, company_state, company_zip, company_priority, max( delivery_period_end_date ) as activityDate, fseTraceHash from operators group by primary_distributor_id, rec_type, primary_distrib_acctnbr, company_name, company_address1, company_city, company_state, company_zip, company_priority, fseTraceHash select distinct activityDate from qmd_baseOperatorSourceRaw order by activityDate select primary_distributor_id, rec_type, primary_distrib_acctnbr, company_name, company_address1, company_city, company_state, company_zip, company_priority, fseTraceHash from qmd_baseOperatorSourceRaw where activityDate = insert into tbl_IMPORT_Operators ( eai_batchId, eai_lineNumber, ownerId, ownerType , #_c# ) values ( , , , , ) update tbl_EAI_InboundBatches set loadedColumns = , lineCount = where batchId = update tbl_EAI_inboundBatches set processingState = where batchId = and ownerId = and ownerType = select distinct fseOperatorId, fseTraceHash from tbl_IMPORT_Operators i with (nolock) inner join tbl_OPR_ClientOperators dl with (nolock) on dl.ownerId = i.ownerId and dl.fsltablecode = i.ownerType and dl.operatorId = i.fseOperatorId and dl.oprCompanyType = '0' where i.ownerId = and i.ownerType = and i.eai_batchId in ( ) order by fseOperatorId update cop set cop.fseLocationOperatorId = from tbl_IMPORT_ContractedOperatorPurchasing cop where cop.ownerId = and cop.ownerType = and cop.eai_batchId = and cop.fseTraceHash =
Base Operator Results Binding Complete at #qmd_baseOperatorResult.recordCount# of #qmd_baseOperatorResult.recordCount# (#getTickCount() - _startTicks# ms.)
select distinct stage.item_code, stage.item_description, fseParentDstId from tbl_IMPORT_ContractedOperatorPurchasing stage with (nolock) where stage.ownerType = and stage.ownerId = and stage.eai_batchid = and nullif( stage.item_code, '' ) is not null and stage.fseSkuId is null order by stage.item_code select distinct s.skuId, s.sku from tbl_PRD_Skus s with (nolock) inner join tbl_MDM_Aliases a with (nolock) on a.objectOwnerId = s.ownerId and a.objectOwnerType = s.fsl_tablecode and a.objectId = s.skuId and a.objectType = 'SKU' where s.ownerId = and s.fsl_tablecode = and a.sourceId = and a.sourceType = 'DST' and a.masterDataType = 'SKU' and a.aliasCode = and a.aliasText = and a.normalizeMethod = 'NONE' select distinct s.skuId, s.sku from tbl_PRD_Skus s with (nolock) inner join tbl_MDM_Aliases a with (nolock) on a.objectOwnerId = s.ownerId and a.objectOwnerType = s.fsl_tablecode and a.objectId = s.skuId and a.objectType = 'SKU' where s.ownerId = and s.fsl_tablecode = and a.sourceId = and a.sourceType = 'DST' and a.masterDataType = 'SKU' and a.aliasText = and a.normalizeMethod = 'NONE' select distinct s.skuId, s.sku from tbl_PRD_Skus s with (nolock) inner join tbl_MDM_Aliases a with (nolock) on a.objectOwnerId = s.ownerId and a.objectOwnerType = s.fsl_tablecode and a.objectId = s.skuId and a.objectType = 'SKU' where s.ownerId = and s.fsl_tablecode = and a.sourceId = and a.sourceType = 'DST' and a.masterDataType = 'SKU' and a.aliasCode = and a.normalizeMethod = 'NONE' update tbl_IMPORT_ContractedOperatorPurchasing set fseSkuId = , fseSku = , fseSkuIdStatus = where eai_batchId = and ownerId = and ownerType = and item_code = and coalesce( item_description, '' ) = and fseSkuId is null and fseParentDstId = select a.aliasId from tbl_MDM_Aliases a with (nolock) where a.sourceId = and a.sourceType = 'DST' and a.masterDataType = 'SKU' and a.objectType = 'SKU' and a.claimAction = 'REMOVE' and a.objectOwnerId = and a.objectOwnerType = and a.aliasCode = and a.aliasText = and a.normalizeMethod = 'NONE' update tbl_IMPORT_ContractedOperatorPurchasing set fseSkuId = 0, fseSku = 'REMOVE', fseSkuIdStatus = 'R' where eai_batchId = and ownerId = and ownerType = and item_code = and coalesce( item_description, '' ) = and fseSkuId is null update tbl_IMPORT_ContractedOperatorPurchasing set fseSKUId = , fseSKU = where ownerType = and ownerId = and eai_batchid = and item_code = and coalesce( fseParentDstId, '' ) = select distinct fseSkuId from tbl_IMPORT_ContractedOperatorPurchasing where ownerType = and ownerId = and eai_batchid = select top 1 coalesce( netWeight, 0.0 ) as netWeight, coalesce( unitPrice_USD, 0.0 ) as price from tbl_DW_ProductHierarchy_#qmd_batch.ownerType##qmd_batch.ownerId# with (nolock) where skuId = update tbl_IMPORT_ContractedOperatorPurchasing set fseSKUWeight = where ownerType = and ownerId = and eai_batchid = and fseSKUId = update tbl_IMPORT_ContractedOperatorPurchasing set lbs = round( cases * fseSkuWeight, 3 ) where ownerType = and ownerId = and eai_batchid = and fseSkuId > 0 and fseSkuWeight > 0 and cases is not null and lbs is null update tbl_IMPORT_ContractedOperatorPurchasing set cases = round( lbs / fseSkuWeight, 3 ) where ownerType = and ownerId = and eai_batchid = and fseSkuId > 0 and fseSkuWeight > 0 and cases is null and lbs is not null select cdr.cdr_recordId, r.contractId, r.requestId, r.payableTo, ct.partnerId, ct.partnerType, r.startDate, r.endDate from tbl_TPM_Requests r with (nolock) inner join tbl_TPM_Contracts ct with (nolock) on ct.contractId = r.contractId and ct.ownerId = r.ownerId and ct.ownerType = r.ownerType and ct.partnerType = 'OPR' and ct.contractName like 'US Foods Blanket Agreement Operator%' inner join tbl_CDR_Distributors cdr with (nolock) on cdr.ownerId = ct.ownerId and cdr.fsl_tablecode = ct.ownerType inner join tbl_DST_Distributors dst with (nolock) on dst.dstId = cdr.fsl_dstId and dst.dstParentCo = 4538 where ct.ownerId = and ct.ownerType = and r.payableTo = 'CDR' union all select cdr.cdr_recordId, r.contractId, r.requestId, r.payableTo, ct.partnerId, ct.partnerType, r.startDate, r.endDate from tbl_TPM_Requests r with (nolock) inner join tbl_TPM_Contracts ct with (nolock) on ct.contractId = r.contractId and ct.ownerId = r.ownerId and ct.ownerType = r.ownerType and ct.partnerType = 'OPR' and ct.contractName like 'Sysco Blanket Agreement Operator%' inner join tbl_CDR_Distributors cdr with (nolock) on cdr.ownerId = ct.ownerId and cdr.fsl_tablecode = ct.ownerType inner join tbl_DST_Distributors dst with (nolock) on dst.dstId = cdr.fsl_dstId and dst.dstParentCo = 4036 where ct.ownerId = and ct.ownerType = and r.payableTo = 'CDR' select distinct stage.fseCdrRecordId, stage.agreement_number, stage.payee_type, stage.delivery_period_end_date from tbl_IMPORT_ContractedOperatorPurchasing stage with (nolock) where stage.ownerType = and stage.ownerId = and stage.eai_batchid = and nullif( stage.agreement_number, '' ) is not null and stage.fseContractId is null and stage.fseRequestId is null and nullif( stage.fseCdrRecordId, 0 ) is not null order by stage.agreement_number update tbl_IMPORT_ContractedOperatorPurchasing set fseContractId = , fseRequestId = , fseRequestIdStatus = 'B' where ownerType = and ownerId = and eai_batchid = and agreement_number = and payee_type = and fseCdrRecordId = and fseContractId is null and fseRequestId is null select distinct stage.agreement_number, stage.payee_type from tbl_IMPORT_ContractedOperatorPurchasing stage with (nolock) where stage.ownerType = and stage.ownerId = and stage.eai_batchid = and nullif( stage.agreement_number, '' ) is not null and stage.fseContractId is null and stage.fseRequestId is null order by stage.agreement_number select r.contractId, r.requestId from tbl_TPM_Contracts c with (nolock) inner join tbl_TPM_Requests r with (nolock) on r.ownerId = c.ownerId and r.ownerType = c.ownerType and r.contractId = c.contractId inner join tbl_TPM_RequestTypes rt with (nolock) on rt.requestTypeId = r.requestTypeId and rt.ownerId = r.ownerId and rt.ownerType = r.ownerType and rt.payableTo = where r.promoNbr like and r.ownerId = and r.ownerType = select r.contractId, r.requestId from tbl_TPM_Contracts c with (nolock) inner join tbl_TPM_Requests r with (nolock) on r.ownerId = c.ownerId and r.ownerType = c.ownerType and r.contractId = c.contractId inner join tbl_TPM_RequestTypes rt with (nolock) on rt.requestTypeId = r.requestTypeId and rt.ownerId = r.ownerId and rt.ownerType = r.ownerType and rt.payableTo = where r.promoNbr like and r.ownerId = and r.ownerType = and r.volumeGenerator = 'Y' select r.contractId, r.requestId from tbl_TPM_Contracts c with (nolock) inner join tbl_TPM_Requests r with (nolock) on r.ownerId = c.ownerId and r.ownerType = c.ownerType and r.contractId = c.contractId inner join tbl_TPM_RequestTypes rt with (nolock) on rt.requestTypeId = r.requestTypeId and rt.ownerId = r.ownerId and rt.ownerType = r.ownerType and rt.payableTo = where r.promoNbr like and r.ownerId = and r.ownerType = update tbl_IMPORT_ContractedOperatorPurchasing set fseContractId = , fseRequestId = , fseRequestIdStatus = 'V' where ownerType = and ownerId = and eai_batchid = and agreement_number = and payee_type = and fseContractId is null and fseRequestId is null select contractId from tbl_TPM_Contracts with (nolock) where assignedContractNbr = and ownerId = and ownerType = select contractId from tbl_TPM_Contracts with (nolock) where assignedContractNbr like and ownerId = and ownerType = select distinct top 1 c.contractId from tbl_TPM_Contracts c with (nolock) inner join tbl_TPM_Requests r with (nolock) on r.ownerId = c.ownerId and r.ownerType = c.ownerType and r.contractId = c.contractId inner join tbl_TPM_RequestTypes rt with (nolock) on rt.requestTypeId = r.requestTypeId and rt.ownerId = r.ownerId and rt.ownerType = r.ownerType and rt.payableTo = where c.assignedContractNbr like and c.ownerId = and c.ownerType = select distinct c.contractId from tbl_TPM_Contracts c with (nolock) inner join tbl_TPM_Requests r with (nolock) on r.ownerId = c.ownerId and r.ownerType = c.ownerType and r.contractId = c.contractId inner join tbl_TPM_RequestTypes rt with (nolock) on rt.requestTypeId = r.requestTypeId and rt.ownerId = r.ownerId and rt.ownerType = r.ownerType and rt.payableTo = ct.partnerType where c.assignedContractNbr like and c.ownerId = and c.ownerType = update tbl_IMPORT_ContractedOperatorPurchasing set fseContractId = where ownerType = and ownerId = and eai_batchid = and agreement_number = and payee_type = and fseContractId is null select distinct ct.partnerId, ct.partnerType, ct.contractId from tbl_IMPORT_ContractedOperatorPurchasing i with (nolock) inner join tbl_TPM_Contracts ct with (nolock) on ct.contractId = i.fseContractId and ct.ownerId = i.ownerId and ct.ownertype = i.ownerType where i.ownerType = and i.ownerId = and i.eai_batchid = and i.fseContractId > 0 update i set i.fsePartnerId = , i.fsePartnerType = from tbl_IMPORT_ContractedOperatorPurchasing i where i.ownerType = and i.ownerId = and i.eai_batchid = and i.fseContractId = select distinct fseContractId, delivery_period_start_date, delivery_period_end_date from tbl_IMPORT_ContractedOperatorPurchasing with (nolock) where ownerType = and ownerId = and eai_batchid = and fseRequestId is null select r.requestId, r.endDate from tbl_TPM_Requests r with (nolock) inner join tbl_TPM_Contracts ct with (nolock) on ct.ownerId = r.ownerId and ct.ownerType = r.ownerType and ct.contractId = r.contractId where ct.ownerId = and ct.ownerType = and ct.contractId = and not ( r.startDate > or r.endDate < ) order by r.endDate desc, r.requestId desc select r.requestId, r.startDate from tbl_TPM_Requests r with (nolock) inner join tbl_TPM_Contracts ct with (nolock) on ct.ownerId = r.ownerId and ct.ownerType = r.ownerType and ct.contractId = r.contractId where ct.ownerId = and ct.ownerType = and ct.contractId = and r.startDate > order by r.startDate, r.requestId desc update tbl_IMPORT_ContractedOperatorPurchasing set fseRequestId= , fseRequestIdStatus = where ownerId = and ownerType = and eai_batchId = and fseContractId = and delivery_period_start_date = and delivery_period_end_date = update tbl_TPM_Requests set volumeGenerator = 'Y' where ownerId = and ownerType = and requestId in ( select distinct fseRequestId from tbl_IMPORT_ContractedOperatorPurchasing with (nolock) where fseRequestId > 0 and ownerId = and ownerType = and eai_batchId = ) ---> select userId as ownerId, 'MSC' as ownerType from tbl_MSC_FslibraryUsers with (nolock) where userId = 227 select userId as ownerId, 'MSC' as ownerType from tbl_MSC_FslibraryUsers with (nolock) where userId = 228 select distinct operator_id from tbl_IMPORT_ContractedOperatorPurchasing stage with (nolock) where stage.ownerType = and stage.ownerId = and stage.eai_batchid = and fsePartnerId is null select clientOPR.operatorid from tbl_OPR_ClientOperators clientOpr with (nolock) inner join tbl_OPR_CLientOperators mdmOPR with (nolock) on mdmOPR.fsl_choId = clientOpr.fsl_choid and mdmOPR.ownerId = and mdmOPR.fsltablecode = where clientOpr.fslTableCode = and clientOpr.ownerid = and mdmOPR.mfrCustNum = update stage set fsePartnerType = 'OPR', fsePartnerId = from tbl_IMPORT_ContractedOperatorPurchasing stage where stage.ownerType = and stage.ownerId = and stage.eai_batchid = and stage.operator_id = and stage.fsePartnerId is null update tbl_EAI_inboundBatches set statusTime = , message = where ownerId = and ownerType = and batchId = insert into tbl_EAI_inboundBatchMessages( batchId, lineNumber, importId, message, messageLevel ) values ( , null, null, , 'INFO' )