Creating a map of a native SQL query
You can map a query written in the database’s native SQL. When writing the query, observe the following rules:
*
*
Do not include an ORDER BY clause in the query. Including an ORDER BY clause adversely affects the performance of information objects built from the map.
*
Use unnamed parameters. An unnamed parameter is represented by a question mark (?). Do not use named parameters, for example :BeginDate.
If the query uses a parameter, it may be necessary to cast the parameter to the appropriate data type. For example, if the query queries an Oracle database, you must use the CAST or RPAD functions to ensure that the data type and length for a string parameter match the data type and length for the corresponding column if the column is of type CHAR or NCHAR. For example, in the following queries the category column is of type CHAR(12):
SELECT orderID FROM items WHERE category = CAST ( ? AS CHAR(12) )
 
SELECT orderID FROM items WHERE category = RPAD ( ?, 12 )

Additional Links:

Copyright Actuate Corporation 2012