Database Reference
In-Depth Information
Figure 12-9. The Partition Source dialog window
If you want to change the binding type, use the dropdown box and select Query Binding. With query
binding, enter a SQL statement that represents the results of a query against your data warehouse tables. In
Listing 12-2, we created a SQL statement that filters out any data from the fact table that is not equal to the year
1994.(The last year in the Pubs database.)
Listing 12-2. A Statement that Filters Data from a Fact Table
SELECT
FactSales.OrderNumber
, FactSales.OrderDateKey
, FactSales.TitleKey, FactSales.StoreKey
, FactSales.SalesQuantity, DimTitles.TitlePrice AS CurrentStdPrice
, DimTitles.TitlePrice * FactSales.SalesQuantity AS DerivedTotalPrice
FROM FactSales
INNER JOIN DimTitles
ON FactSales.TitleKey=DimTitles.TitleKey
INNER JOIN DimDates
ON FactSales.OrderDateKey=DimDates.DateKey
WHERE DimDates.[Year]=1994
Search WWH ::




Custom Search