Database Reference
In-Depth Information
Step 5: Build the Main_Query
1.
From the Query Explorer tab, select Main_Query .
2.
Drag Union1 into the Data Items pane.
Yo u c o u l d h a v e a l s o c h o s e n t o d r a g a l l d a t a i t e m s i n d i v i d u a l l y i n t o t h e Data Items pane.
3.
Click the City data item in the Data Items pane of the query design window, and change
the Pre-Sort property to Sort ascending .
4.
Click the Product type data item in the Data Items pane of the query design window,
and change the Pre-Sort property to Sort ascending .
5.
Click the Product query subject in the Data Items pane of the query design window,
and change the Pre-Sort property to Sort ascending .
6.
From the Run menu, select View Tabular Data to verify that your query results match
what's shown in Figure 4.5. Click OK to dismiss the warning message.
Figure 4.5
Main_Query query results
Because we defined a union, our result shows two records for each product that had
inventory, and one zero record for any product that did not have inventory.
The aggregation of inventory numbers was handled by the modeler in the
Products_in_Inventory query. The projection list has the Aggregate Function property
Search WWH ::




Custom Search