select *
from qmd_territories
where territoryid in ()
--->
select campaignid, campaignname
from tbl_crm_campaigns
where ownerid =
and ownertype =
and active =
and campaignid in (
select distinct CampaignId
from tbl_SPL_Opportunities
where OwnerID =
and ownertype =
and CampaignId is not null
)
order by campaignname
selected>All Stages
selected>Ideas Only
selected>Ideas and Active
selected>Active: All
selected>Active: #numberformat(likelihoodPercent*100,"99")#% #stageName#
selected>Active and Sold
selected>Closed: All
selected>Closed: Sale
selected>Closed: No Sale
selected>All Timeframes
selected>Order Date Past Due
selected>Order Date This Fiscal Year
selected>Order Date This Calendar Year
selected>Order Date Within 30 Days
selected>Order Date in The Future
All Territories
selected>#htmleditformat(territoryName)#
All Campaigns
selected>#campaignname#
All Budget Categories
selected >#bgtCategory#
selected >All Next Steps
selected>Next Steps Past Due
selected>Next Steps Due Within 7 Days
selected>Next Steps Due Within 30 Days
selected>All Sample Status
selected>Sample Not Needed
selected>Sample Requested
selected>Sample Sent
All Segments
#ucase(Description)#
selected >#Description#
Sort Order
selected>Sort by Account Name
selected>Sort by Next Action Date
selected>Sort by Order Date
selected>Largest Volume First
selected>Smallest Volume First