select partnerid, partnertype, max(int.interactionid) as interactionid from tbl_crm_interactionsaledetails isd inner join tbl_crm_interactions int on int.interactionid = isd.interactionid and int.partnertype = 'opr' and int.disposition <> '?' where isd.ownerid = and isd.ownertype = and isd.salesubjecttype = 'sku' and isd.salesubjectid = and isd.disposition = group by partnerid, partnertype select 0 as rownumber, opr.operatorid as partnerid, 'OPR' as partnertype, opr.companyname as partnername, int.interactiondate, isd.disposition, isd.saleqty, isd.saledurationunit, fsp.firstname, fsp.lastname, fsp.email, fsp.fspro_userid as salesrepid, isd.comment, opr.address, opr.city, opr.state, opr.zipcode from tbl_crm_interactionsaledetails isd inner join tbl_crm_interactions int on int.interactionid = isd.interactionid and int.interactionid in () inner join tbl_opr_clientoperators opr on opr.operatorid = int.partnerid and opr.territoryid in () left outer join tbl_fspro_members fsp on fsp.fspro_userid = int.dispositionuserid where isd.ownerid = and isd.ownertype = and isd.salesubjecttype = 'sku' and isd.salesubjectid = order by #url.orderby# select * from queryAccounts where rownumber >= #_startRow# and rownumber <= #_endRow#
Page #url.pg# of #_pageCount#
  
  • #numberformat(_totalOriginalRecords,"9,999")# Presentations Found
  • #partnername#

    #city#, #state#

    #dateformat(interactiondate,"mm/dd/yyyy")# - #firstname# #lastname#

    #variables.codeDescription# #saleqty# #lcase(saledurationunit)#

    #comment#