Certain rules and guidelines apply when you create an SQL view.
Consider the following rules and guidelines when you create an SQL view:
All tables in the SQL view must exist in the same database.
The SQL statement must use valid SQL syntax based on the database of the tables included in the SQL view. Data Validation Option does not validate the SQL statement syntax.
The number and order of the columns must match in the column definitions and the SQL statement of the SQL view.
The scale must be zero for datetime, integer, and string datatypes.
If you create a column in the SQL view, verify that the datatype, precision, and scale match the PowerCenter datatype, precision, and scale shown in the
Column Definitions
area.
You can add database functions, any join type, subqueries, and stored procedures in the SQL statement of an SQL view.
If the SQL view calls a stored procedure, the connection assigned to SQL view must have Execute permission on the stored procedure.
If you include the SQL view in a table pair, you can create a WHERE clause for the table pair based on a field in the SQL view.
When you use SQL view as the data source, you can edit the connection in the table pairs, single tables, aggregate views, and join views.