select distinct importId, ownerId, ownerType, operatorId, fspro_userid, recordSource, company_id, extendedFld_1, company_name, company_type, opr_class, seg_team_acct, company_phone, company_address1, company_address2, company_city, company_state, company_zip, company_last_modify_date, affiliate_nbr, affiliation_type, affiliation_orgNbr from tbl_IMPORT_CLientOperators i where i.recordSource = and i.ownerId = and i.ownerType = select clientsegid, description from tbl_OPR_ClientSegments where ownerId = and fsl_tablecode = order by sortRank desc select listId from tbl_LST_partnerLists where ownerId = and ownerType = and listName = and listType = 'SYSTEM' and partnerType = 'OPR' SET NOCOUNT OFF INSERT INTO tbl_LST_PartnerLists ( ownerId, ownerType, listName, listType, createdBy, partnerType, locked ) VALUES ( , , , , , , 'Y' ) SELECT listId = @@identity SET NOCOUNT ON select operatorId, companyName from tbl_OPR_ClientOperators where ownerId = and fsltablecode = and crmActive = 'Y' and mfrCustNum = and oprcompanyType =

Affiliate not found for #affiliation_type#:#affiliation_orgNbr#

select clientSegId from qmd_segments where description =
Can't find #company_type# for #company_Name#:#company_id#
select classificationId from qmd_classifications where name = No classification for #opr_class# - #company_id#
set nocount on insert into tbl_OPR_ClientOperators ( ownerId, fsltablecode, companyName, mfrcustnum, address, address2, city, state, zipcode, recordSource, datecreated, lastUpdated, oprSegment, independentYn, oprCompanyType, setmethod, classificationId ) values ( , , , , , , , , , , {fn now() }, , , , , , ) select operatorId = @@identity set nocount off update tbl_OPR_ClientOperators set mfrCustNum = where operatorId = and ownerId = and fsltablecode = update tbl_CRM_affiliations set affiliationStatus = 'A', affiliationDate = { fn now() }, sourceId = -1, sourceType = 'SYS' where affiliationId = and partnerAffiliateNbr = and ownerId = and ownerType = insert into tbl_CRM_Affiliations ( ownerId, ownerType, affiliationType, orgId, orgType, affiliationDate, affiliationStatus, partnerId, partnerType, partnerAffiliateNbr, sourceId, sourceType ) values ( , , , , , , , , , , , ) update tbl_IMPORT_ClientOperators set operatorId = where importId = update tbl_OPR_ClientOperators set mfrCustNum = , crmActive = 'Y' where operatorId = and ownerId = and fsltablecode = insert into tbl_LST_PartnerListItems (listId, partnerId ) values( , )
select importId, ownerId, ownerType, operatorId, fspro_userid, recordSource, contact_last_name, contact_first_name, contact_fax, contact_phone, contact_mobile_phone, contact_email, contact_last_modify_date, primary_contact_indicator, contact_title, contact_type from tbl_IMPORT_ClientOperators ci where ci.recordSource = and ci.ownerId = and ci.ownerType = and ci.operatorId is not null and ci.fspro_userid is null select jobFunctionId from qmd_partnerContactJobFunctions where jobFunctionName = set nocount on insert into tbl_FSPro_members ( firstName, lastName, email, phone, fax, cellPhone, officeAddrSame, createDate, lastUpdated, originalSource, orgId, orgType, ownerId, fsl_tablecode, title, cajobfunction ) values( , , , , , , 1, { fn now() }, , , , , , , , ) select fspro_userid = @@identity set nocount off update tbl_OPR_ClientOperators set primaryContactId = where operatorId = update tbl_IMPORT_ClientOperators set fspro_userId = where importId = ---> select distinct division from tbl_TER_TerritoryLevels where brokerLevel = 1 and ownerId = and fsl_tablecode = update opr set opr.territoryId = t.territoryId from tbl_IMPORT_ClientOperators i inner join tbl_OPR_CLientOperators opr on opr.operatorId = i.operatorId and opr.ownerId = i.ownerId and opr.fsltablecode = i.ownerType and opr.setMethod = 1 inner join tbl_TER_Territories t on t.ownerId = i.ownerId and t.fsl_tablecode = i.ownerType and t.name = i.seg_team_acct where i.ownerId = and i.ownertype = and i.recordSource = select firstName, lastName, fspro_userid, orgId, orgType, email, originalSource from tbl_Fspro_members where originalSource = select opr.operatorId, opr.mfrcustnum, opr.primaryContactId, m.fspro_userId, m.cajobfunction, opr.setMethod, m.firstName, m.lastName, m.email, m.phone, opr.ownerId, opr.fsltablecode, opr.companyName, opr.address, opr.address2, opr.city, opr.state, opr.zipcode, opr.territoryId, opr.oprsegment, opr.recordSource, opr.datecreated, opr.lastUpdated, opr.crmactive, t.name territoryName, case when t.name is null then 0 else 1 end sortRank, cs.description segDesc, cls.name clsName, m.cellPhone, m.fax, i.extendedFld_1 from tbl_OPR_CLientOperators opr left outer join tbl_FSPro_members m on m.ownerId = opr.ownerId and m.fsl_tablecode = opr.fsltablecode and m.orgId = opr.operatorId and m.orgType = 'OPR' left outer join tbl_OPR_CLassifications cls on cls.classificationId = opr.classificationId left outer join tbl_TER_TErritories t on t.territoryId = opr.territoryId and t.ownerId = opr.ownerId and t.fsl_tablecode = opr.fsltablecode left outer join tbl_OPR_ClientSegments cs on cs.clientSegid = opr.oprsegment inner join tbl_LST_PartnerListItems pli on pli.partnerId = opr.operatorId and pli.listId = inner join tbl_IMPORT_ClientOperators i on i.operatorId = opr.operatorId and i.recordSource = order by sortRank, companyName, opr.operatorId
*** Preview *** #_recordSource# - #lsDateFormat( now() )# at #lstimeformat( Now() )# *** Preview ***
Class Operator Address Contact Segment Territory
#clsName#
#extendedFld_1#
#companyName#
#mfrCustNum#
#address#
#address2#
#city#, #state# #zipcode#

#firstName# #lastName#
roleId: #caJobFunction#
&##160;&##160;email:#email#
&##160;&##160;phone:#phone#
&##160;&##160;cell:#cellPhone#
&##160;&##160;fax:#fax#
#segDesc# #setMethod#: #territoryName#Unassigned
#application.datasource#: #qmd_check.recordCount#(#importCount#) Records Imported
update opr set opr.customFld_4 = 'Y' from tbl_OPR_ClientOperators opr inner join tbl_LST_PartnerListItems pli on pli.partnerId = opr.operatorId where pli.listId = and opr.ownerId = and opr.fsltablecode = #resultsHTML# #resultsHTML#