select int.partnerid, int.partnertype from tbl_crm_interactionsaledetails isd with (nolock) inner join tbl_crm_interactions int with (nolock) on int.interactionid = isd.interactionid where isd.ownerid = and isd.ownertype = and isd.interactiondetailid = select isd.interactionDetailId from tbl_crm_interactions int with (nolock) inner join tbl_crm_interactionsaledetails isd with (nolock) on isd.interactionid = int.interactionid and isd.salesubjecttype = and isd.saleSubjectId = and isd.salesubjecttype = and isd.saleSubjectId = where int.ownertype = and int.ownerid = and int.partnerid = and int.partnertype = select s.sku, s.skuDesc from tbl_PRD_SKUs s with (nolock) where s.ownerId = and s.fsl_tablecode = and s.skuId = select p.prodId,p.shortdesc from tbl_PRD_Products p with (nolock) where p.ownerId = and p.fsl_tablecode = and p.prodId = select top #_rowsToShow# i.interactionDate, isd.saleSubjectId, isd.interactionDetailId, isd.disposition, isd.comment, isd.sampleStatus, isd.sampleComments,isd.saleSubjectType from tbl_CRM_interactionSaleDetails isd with (nolock) inner join tbl_CRM_interactions i with (nolock) on i.interactionId = isd.interactionId where i.ownerId = and i.ownerType = and isd.saleSubjectType = 'SKU' and i.disposition <> '?' and isd.saleSubjectId = and isd.saleSubjectType = 'PRD' and i.disposition <> '?' and isd.saleSubjectId = and isd.interactionDetailId in ( ) order by i.interactionDate desc

#htmleditformat( qmd_sku.sku )# - #htmleditformat( qmd_sku.skuDesc )# #htmleditformat( qmd_prod.prodId )# - #htmleditformat( qmd_prod.shortdesc )#

Date Comment Status Sample
#lsdateformat( interactionDate, "MM/DD/YY" )# #htmleditformat( comment )#&##160; No Sale Sale Still ActiveFollow-Up #disposition# Sampled - #htmleditformat( sampleComments )# Not Needed Sample Requested &##160; &##160; &##160; &##160;