Microsoft Office Tutorials and References
In Depth Information
■ A relationship has a type (the middle column in the relationship pane) that indicates how
to retrieve rows from the database. You definitely need to understand how different
types of relationships affect the query result to get the data you need.
So reading the result of the auto detection algorithm, you can see that it detected two
relationships: one between Products and ProductSubCategory and one between ProductSubCategory
and ProductCategory, and it has chosen the INNER type of relationship for both.
We return later in our exploration of the query designer to analyze how different types of
relationships return different results. At the moment, it is enough to click OK to see the query
built. PowerPivot returns to the query editor, which is now filled with a complex query that
the designer has written for us, as you can see in Figure 4-22.
FIguRE 4-22 The SQL query editor, with a query written by the designer.
If you click Finish, you start the loading process, which means that the query is executed against
the database and all the rows are imported into the PowerPivot database. Nevertheless, if you
just look at the number of rows returned, you see bad news: only 295 rows have been loaded,
while the Products table effectively contains 504 different products.