select int.interactionid, int.interactiondate, int.disposition, fsp.fspro_userid as salesrepid, fsp.firstname as salesrepfirst, fsp.lastname as salesreplast, case when int.partnertype = 'opr' then opr.companyname else cdr.cdr_dstname end as companyName from tbl_crm_interactions int left outer join tbl_fspro_members fsp on fsp.fspro_userid = int.dispositionuserid left outer join tbl_CRM_Participants par on par.participantid = int.participantid left outer join tbl_opr_clientoperators opr on opr.operatorid = int.partnerid and int.partnertype = 'opr' left outer join tbl_cdr_distributors cdr on cdr.cdr_recordid = int.partnerid and int.partnertype in () where int.ownerid = and int.ownertype = and int.disposition = '?' and int.dispositionuserid = and exists ( select * from tbl_crm_interactionsaledetails isd inner join tbl_prd_skus sku on sku.skuid = isd.salesubjectid and sku.mfrid = where isd.interactionid = int.interactionid and isd.salesubjecttype = 'sku' ) order by interactiondate asc
#_lowerPagerDisplay#