select cs.clientsegid from tbl_OPR_ClientSegments cs inner join tbl_OPR_Segments s on s.segmentId = cs.segmentId where cs.ownerId = and cs.fsl_tablecode = and s.segment = 'Healthcare' order by cs.sortRank select opr.operatorId from tbl_OPR_ClientOperators opr inner join tbl_CHO_Operators o on o.cho_id = opr.fsl_choid and o.cho_name = 'Premier' where opr.ownerId = and opr.fsltablecode = update tbl_IMPORT_PremierActivity set fsePremierOperatorId = where eai_batchId = and ownerId = and ownerType = update activity set activity.fseSkuId = s.skuId, activity.fseProdId = s.prodId from tbl_IMPORT_PremierActivity activity inner join tbl_PRD_SKus s on s.sku = activity.productIdentifier and s.ownerId = activity.ownerId and s.fsl_tablecode = activity.ownerType where activity.ownerId = and activity.ownerType = and activity.eai_batchId = update activity set activity.fseMktCategoryId = mktCat.filterId, activity.fseMktSubCategoryId = mktSubCat.attrId from tbl_IMPORT_PremierActivity activity inner join tbl_ORG_AttributeLinks scl on scl.child_attrId = activity.fseProdId and scl.child_attrTypeId = 59 and scl.mstr_attrTypeId = 29 inner join tbl_ORG_Attributes mktSubCat on mktSubCat.attrId = scl.mstr_attrId and mktSubCat.ownerId = activity.ownerId and mktSubCat.fsl_tablecode = activity.ownerType inner join tbl_ORG_AttributeLinks cl on cl.child_attrId = mktSubCat.attrId and cl.child_attrTypeId = 29 and cl.mstr_attrTypeId = 28 inner join tbl_CMM_Filters mktCat on mktCat.filterId = cl.mstr_attrId and mktCat.ownerId = mktSubCat.ownerId and mktCat.fsl_tablecode = mktSubCat.fsl_tablecode inner join tbl_CMM_FilterTypes ft on ft.filterTypeId = mktCat.filterTypeId and ft.filterTypeName = 'ProductHierarchy' where activity.ownerId = and activity.ownerType = and activity.eai_batchId = update activity set activity.fseOperatorId = opr.operatorId, activity.fseOperatorStatus = 'U' from tbl_IMPORT_PremierActivity activity inner join tbl_CRM_Affiliations af on af.orgId = activity.fsePremierOperatorId and af.orgType = 'OPR' and af.partnerType = 'OPR' and af.partnerAffiliateNbr = activity.EntityCode inner join tbl_OPR_CLientOperators opr on opr.operatorId = af.partnerId and opr.ownerId = af.ownerId and opr.fsltablecode = af.ownerType where activity.eai_batchId = and activity.ownerId = and activity.ownerType = select distinct rsm from tbl_IMPORT_PremierActivity activity where activity.eai_batchId = and activity.ownerId = and activity.ownerType = update tbl_IMPORT_PremierActivity set tmpRSMFirstName = , tmpRSMLastName = where eai_batchId = and ownerId = and ownerType = and rsm = update activity set activity.fseTerritoryId = ter.territoryId from tbl_IMPORT_PremierActivity activity inner join tbl_FSPro_Members m on m.lastName = activity.tmpRSMLastName and m.firstName = activity.tmpRSMFirstName and m.staffmember = 1 and m.ownerId = activity.ownerId and m.fsl_tablecode = activity.ownerType inner join tbl_TER_TerritoryLevels lvl on lvl.ownerId = m.ownerId and lvl.fsl_tablecode = m.fsl_tablecode and lvl.brokerLevel = 1 inner join tbl_TER_Territories ter on ter.primaryManager = m.fspro_userid and ter.ownerId = m.ownerId and ter.fsl_tablecode = m.fsl_tablecode and ter.levelId = lvl.parentLevelId where activity.eai_batchId = and activity.ownerId = and activity.ownerType = select distinct eai_batchId, ownerId, ownerType, memberName, fseTerritoryId, entityCode from tbl_IMPORT_PremierActivity activity where activity.eai_batchId = and activity.ownerId = and activity.ownerType = and activity.fseOperatorId is null and activity.fseOperatorStatus is null select opr.operatorId, opr.companyName from tbl_OPR_ClientOperators opr inner join tbl_TER_Territories ter on ter.territoryId = opr.territoryId and ter.ownerId = opr.ownerId and ter.fsl_tablecode = opr.fsltablecode and ter.parentTerritoryId = left outer join tbl_CRM_Affiliations af on af.partnerId = opr.operatorId and af.partnerType = 'OPR' and af.affiliationType = 'GPO' and af.orgId = and af.orgType = 'OPR' where opr.ownerId = and opr.fsltablecode = and af.affiliationId is null and opr.operatorId not in ( ) queryAddColumn( qmd_operatorLookup, "companyNameEditDistance", "integer", ArrayNew(1) ); Candidate Count = #qmd_operatorLookup.recordCount#
querySetCell( qmd_operatorLookup, "companyNameEditDistance", _companyNameDistance, qmd_operatorLookup.currentRow ); select * from qmd_operatorLookup where ( companyNameEditDistance <= 1 ) order by companyNameEditDistance update tbl_IMPORT_PremierActivity set fseOperatorId = , fseOperatorStatus = 'M' where eai_batchId = and ownerId = and ownerType = and entityCode = update tbl_IMPORT_PremierActivity set fseOperatorStatus = 'A', fseOperatorId = null where eai_batchId = and ownerId = and ownerType = and entityCode =
StructDelete( variables, "matcher" ); select distinct activity.entityCode, activity.memberName, activity.fseOperatorStatus, opr.companyName, opr.address, opr.address2, opr.city, opr.state, opr.zipCode from tbl_IMPORT_PremierActivity activity inner join tbl_OPR_ClientOperators opr on opr.operatorId = activity.fseOperatorId and opr.ownerId = activity.ownerId and opr.fsltablecode = activity.ownerType where activity.ownerId = and activity.ownerType = and activity.eai_batchId = and activity.fseOperatorStatus in ( 'M','U', 'A') order by activity.memberName

Premier Activity File Load Results

Premier Operators Loaded

Entity Code Name Addr 1 Addr 2 City State Zip Status
#entityCode# #memberName# &##160; &##160; &##160; &##160; &##160; Matched AddedExisting
&##160; #companyName# #address# #address2#&##160; #city# #state# #zipCode#
#qmd_loaded.recordCount# Operators Loaded