select acct.fsl_choId, acct.mfrCustNum as accountID, acct.companyName as accountName, acct.address as accountAddress, acct.city as accountCity, acct.state as accountState, acct.zipCode as accountZipCode, seg.description as segment, matches.ownerId, matches.ownertype, matches.sourceID, matches.source, matches.companyName, matches.address, matches.city, matches.state, matches.zipcode, matches.recordSource, matches.fseOperatorId, matches.fsl_choIdStatus linkStatus, case when cho.cho_acctClosed = '1' then 'Y' else 'N' end acctClosed, dst.dstName distributorName, cdr.cdr_dstCode RPCCustomerNbr, acct.operatorId acctOperatorId from tbl_OPR_ClientOperators acct with (nolock) left outer join tbl_OPR_ClientSegments seg with (nolock) on seg.ownerId = acct.ownerId and seg.fsl_tablecode = acct.fsltablecode and seg.clientSegId = acct.oprsegment left outer join tbl_CHO_Operators cho with (nolock) on cho.cho_id = acct.fsl_choId left outer join ( select mfr.mfr_name as source, opr.ownerId, opr.fsltablecode as ownerType, opr.operatorId fseOperatorId, opr.mfrCustNum sourceID, opr.companyName, opr.address, opr.city, opr.state, opr.zipCode, opr.fsl_choId, opr.recordSource, opr.fsl_choIdStatus, bdst.dstId from tbl_OPR_ClientOperators opr inner join tblManufacturers mfr on mfr.mfr_id = opr.ownerId left outer join tbl_CDR_Distributors cdr on cdr.cdr_recordId = opr.distrib1 and cdr.ownerId = opr.ownerId and cdr.fsl_tablecode = opr.fsltablecode left outer join tbl_DST_Distributors bdst on bdst.dstId = cdr.fsl_dstId where opr.ownerId = 1 and opr.fsltablecode = 'MFR' and opr.fsl_choId > 0 union select usr.company as source, opr.ownerId, opr.fsltablecode as ownerType, opr.operatorId fseOperatorId, opr.mfrCustNum sourceID, opr.companyName, opr.address, opr.city, opr.state, opr.zipCode, opr.fsl_choId, opr.recordSource, opr.fsl_choIdStatus, bdst.dstId from tbl_OPR_ClientOperators opr inner join tbl_MSC_FslibraryUsers usr on usr.userId = opr.ownerId left outer join tbl_CDR_Distributors cdr on cdr.cdr_recordId = opr.distrib1 and cdr.ownerId = opr.ownerId and cdr.fsl_tablecode = opr.fsltablecode left outer join tbl_DST_Distributors bdst on bdst.dstId = cdr.fsl_dstId where opr.ownerId = 211 and opr.fsltablecode = 'MSC' and opr.fsl_choId > 0 union select dst.dstname as source, opr.ownerId, opr.fsltablecode as ownerType, opr.operatorId fseOperatorId, opr.mfrCustNum sourceID, opr.companyName, opr.address, opr.city, opr.state, opr.zipCode, opr.fsl_choId, opr.recordSource, opr.fsl_choIdStatus, bdst.dstId from tbl_OPR_ClientOperators opr inner join tbl_DST_Distributors dst on dst.dstid = opr.ownerId left outer join tbl_CDR_Distributors cdr on cdr.cdr_recordId = opr.distrib1 and cdr.ownerId = opr.ownerId and cdr.fsl_tablecode = opr.fsltablecode left outer join tbl_DST_Distributors bdst on bdst.dstId = cdr.fsl_dstId where opr.ownerId in ( 4036, 4538 ) and opr.fsltablecode = 'DST' and opr.fsl_choId > 0 union select cho.cho_name as source, opr.ownerId, opr.fsltablecode as ownerType, opr.operatorId fseOperatorId, opr.mfrCustNum sourceId, opr.companyName, opr.address, opr.city, opr.state, opr.zipCode, opr.fsl_choId, opr.recordSource, opr.fsl_choIdStatus, bdst.dstId from tbl_OPR_ClientOperators opr inner join tbl_CHO_Operators cho on cho.cho_id = opr.ownerId left outer join tbl_CDR_Distributors cdr on cdr.cdr_recordId = opr.distrib1 and cdr.ownerId = opr.ownerId and cdr.fsl_tablecode = opr.fsltablecode left outer join tbl_DST_Distributors bdst on bdst.dstId = cdr.fsl_dstId where opr.ownerId in ( 15, 292, 610, 251 ) and opr.fsltablecode = 'CHO' and opr.fsl_choId > 0 ) matches on matches.fsl_choId = acct.fsl_choId left outer join tbl_DST_Distributors dst on dst.dstId = matches.dstId left outer join tbl_CDR_Distributors cdr on cdr.fsl_dstId = dst.dstId and cdr.ownerId = 1 and cdr.fsl_tablecode = 'MFR' and nullif( cdr.cdr_dstCode, '' ) is not null and coalesce( cdr.fsl_mapPriority, 1 ) = 1 where acct.ownerId = #_libOwnerId# and acct.fsltablecode = '#_libOwnerType#' order by acct.accountName, matches.source, matches.companyName select count(*) operatorCount, sum( case when fsl_choId > 0 then 1 else 0 end ) mappedCount from tbl_OPR_CLientOperators with (nolock) where ownerId = and fsltablecode = select count(*) operatorCount, sum( case when fsl_choId > 0 then 1 else 0 end ) mappedCount from tbl_OPR_CLientOperators with (nolock) where ownerId = and fsltablecode = select count(*) operatorCount from qmd_data where ownerId = and ownerType =
download matches

CRM Account
1FS Master
#htmleditformat( _ownerName )#
select distinct ownerId, ownerType from qmd_data where ownerId > 0 and accountId = select * from qmd_data where ownerId = and ownerType = and accountId = order by companyName
#htmleditformat( accountId )#
#htmleditformat( accountName )#
#htmleditformat( accountAddress )#
#htmleditformat( accountCity )#, #htmleditformat( accountState )# #htmleditformat( accountZipCode )#
FSL: #fsl_choId#
test
select cho_name, cho_address, cho_city, cho_state, cho_zipcode, cho_recordSource from tbl_CHO_Operators with (nolock) where cho_id =
&##160;
#htmleditformat( qmd_cho.cho_name )#
#htmleditformat( qmd_cho.cho_address )#
#htmleditformat(qmd_cho.cho_city )#, #htmleditformat( qmd_cho.cho_state )# #htmleditformat( qmd_cho.cho_zipCode )#
#htmleditformat( qmd_matches.sourceId )#
#htmleditformat( qmd_matches.companyName )#
#htmleditformat( qmd_matches.address )#
#htmleditformat( qmd_matches.city )#, #htmleditformat( qmd_matches.state )# #htmleditformat( qmd_matches.zipcode )#
#htmleditformat( qmd_matches.recordSource )##linkStatus#
#fseOperatorId#
No Matches