select opr.operatorId, opr.companyName, opr.ownerId, opr.fsltablecode, opr.fsl_choId, dd.cdr_recordId, cdr.cdr_dstName, dd.accountNumber, opr.deliveryLocationFor from tbl_OPR_ClientOperators opr with (nolock) inner join tbl_OPR_DistributionDetails dd with (nolock) on dd.ownerId = opr.ownerId and dd.ownerType = opr.fsltablecode and dd.operatorId = opr.operatorId inner join tbl_CHO_Operators cho with (nolock) on cho.cho_id = opr.fsl_choId inner join tbl_CDR_Distributors cdr with (nolock) on cdr.cdr_recordId = dd.cdr_recordId and cdr.ownerId = dd.ownerId and cdr.fsl_tablecode = dd.ownerType where opr.fsl_choId = and nullif( dd.accountNumber, '' ) is not null and opr.ownerId= and opr.fsltablecode = and dd.cdr_recordId = order by accountNumber
#htmleditformat( qmd_deliveryLocations.cdr_dstName )#
Operator Acct Nbr
#htmleditformat( companyName )# (#operatorId#) #htmleditformat( accountNumber )#
select opr.operatorId, opr.address, opr.address2, opr.city, opr.state, opr.zipcode, opr.recordSource from tbl_OPR_ClientOperators opr with (nolock) where opr.fsltablecode = and opr.ownerId = and opr.fsl_choId = and opr.operatorId not in ( ) update tbl_OPR_CLientOperators set oprCompanyType = 'D', deliveryLocationFor= , crmActive = 'N' where ownerId = and fsltablecode = and operatorId in ( )