Databases Reference
In-Depth Information
7
Click
OK
to save the expression. The Expression Builder window closes. The
expression appears in the
Expression
column on the
Mapping
tab, as shown in
the following display.
Display 10.8
SQL Join Mapping Tab With a SUM Expression
8
Click
Apply
to save your changes without closing the properties window.
9
(Optional) To see how the SQL code is changed by the expression that you just
defined, click the
SQL
tab. The code on the
SQL
tab should resemble the following
sample:
SELECT 'ORGANIZATION_DIM'n.'Employee_ID'n,
'ORGANIZATION_DIM'n.'Company'n, 'ORGANIZATION_DIM'n.'Department'n,
'ORGANIZATION_DIM'n.'Section'n, 'ORGANIZATION_DIM'n.'Org_Group'n,
'ORGANIZATION_DIM'n.'Job_Title'n, 'ORGANIZATION_DIM'n.'Employee_Name'n,
SUM('ORDER_FACT'n.'Total_Retail_Price'n) format=8. AS
'Total_Retail_Price'n
FROM 'orstar'n.'ORGANIZATION_DIM'n
INNER JOIN 'orstar'n.'ORDER_FACT'n
ON ('ORDER_FACT'n.'Employee_ID'n = 'ORGANIZATION_DIM'n.'Employee_ID'n)
The previous SQL statement selects the mapped columns from the
ORGANIZATION_DIM and ORDER_FACT tables, summarizes the contents of the
Total_Retail_Price column, and joins the result on the Employee_ID column.
Search WWH ::
Custom Search