Databases Reference
In-Depth Information
3
In the
Target Table
pane on the
Mapping
tab, press the CTRL key, left-click the
name of each column to be deleted, and select
Delete
from the pop-up menu.
When you are finished, the
Mapping
tab will resemble the following display.
Display 10.6
SQL Join Mapping Tab: After Extra Columns Are Deleted
4
Click
Apply
to save your changes without closing the properties window.
5
(Optional) To see how the SQL code is updated based on the contents of the
Mapping
tab and other tabs in the SQL Join transformation, 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,
'ORDER_FACT'n.'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 and joins the result on the
Employee_ID column.
Change One Column to a Calculated Column
The Total_Retail_Price column from the ORDER_DETAIL table contains the price for
a particular item that was sold by an employee. However, the report that you want to
create shows the total sales for each employee. (See Display 10.1 on page 150.)
Search WWH ::
Custom Search