DECLARE @Country VARCHAR(20SET @Country 'US'    
SELECT *
    
FROM Sales.SalesOrderHeader hSales.Customer c
        
Sales.SalesTerritory t
    
WHERE h.CustomerID c.CustomerID
        
AND c.TerritoryID t.TerritoryID
        
AND CountryRegionCode @Country
   
OPTION (OPTIMIZE FOR (@Country 'US'))

Comments

  1. Hello..just curious to know...is this an example for multiple joins? I came across your blog while searching for paging and rendering options in ssrs...very interesting blog...

    ReplyDelete

Post a Comment

Popular posts from this blog

SSRS Report Design: Best Practices

SSAS OLAP Design - Best Practices

Enable Usage-Based Optimization in SSAS