select marketingActivityId, marketingActivityName from tbl_CRM_MarketingActivities where ownerId= 26 and ownerType = 'MFR' order by marketingActivityName
select p.marketingActivityId, ma.marketingActivityName, ter.name territoryName, o.mdmId, count(*) operatorCount from tbl_CRM_Participants p inner join tbl_CRM_marketingActivities ma on ma.marketingActivityId = p.marketingActivityId inner join tbl_OPR_ClientOperators o on o.operatorId = p.operatorId and o.mdmType = 'CBS' inner join tbl_TER_Territories ter on ter.territoryId = o.territoryId where p.ownerId = 26 and p.ownerType = 'MFR' and p.marketingActivityId = group by p.marketingActivityId, ma.marketingActivityName, ter.name, o.mdmId having count(*) > 1 order by p.marketingActivityId
select ter.name territoryName, p.participantId, opr.operatorId, opr.companyName, opr.address, opr.city, opr.state, opr.zipCode, opr.recordSource from tbl_CRM_participants p inner join tbl_OPR_ClientOperators opr on opr.operatorId = p.operatorId inner join tbl_TER_Territories ter on ter.territoryId = opr.territoryId where p.marketingActivityId = and opr.ownerId = 26 and opr.fsltablecode = 'MFR' and opr.mdmType = 'CBS' and opr.mdmId = order by opr.operatorId select i.interactionId, i.interactionDate, i.disposition, i.recordSource, count( isd.interactionDetailId ) itemCount from tbl_CRM_interactions i left outer join tbl_CRM_interactionSaleDetails isd on isd.interactionId = i.interactionId where i.participantId = and i.ownerId = 26 and i.ownerType = 'MFR' and i.partnerType = 'OPR' and i.partnerId = group by i.interactionId, i.interactionDate, i.disposition, i.recordSource order by i.interactionId
Marketing Activity: #htmleditformat( marketingActivityName )#
#htmleditformat( territoryName )# MDM CBS:#htmleditformat( mdmId )#
#operatorId# #htmleditformat( companyName )# #htmleditformat( address )# #htmleditformat( city )#, #htmleditformat( state )# #htmleditformat( zipCode )# #htmleditformat( recordSource )# KeepMerge
&##160;
&##160; Date Status Source Items
#interactionId# #lsdateformat( interactionDate )#TBD PlannedFinalized #htmleditformat( qmd_interactions.recordSource )# #lsnumberformat( itemCount )#