Working with Query Definitions
Two types of SQL queries can be used in a report definition: a base query and a parameter query.
A base query enables users to pull data from various tables and display the data as report output. The base extends the definition of a standard report, and can be reused with multiple reports. For example, using one query definition, you can show different columns or groupings. In one report, you can list amounts by account and group by entity, and in another list amount by entity and group by account.
The parameter SQL query enables you to run a query against the parameters in the report definition. For example, use the query to select the Location, Period, Category, or Account.
For information on the tables and joins you can use to build your SQL queries, see TDATASEG Table Reference and TLOGPROCESS Table Reference in Appendix G. The TDATASEG table is used to store the data loaded by the user, the transformation between the source dimension members, and the results of the mapping process. The TLOGPROCESS table is used to store the workflow process status for a location, category, and period.
You can save a query definition as an XML file, which, in turn, you can use to create custom templates using Oracle Business Intelligence Publisher or the BI Publisher desktop addin for Microsoft Word.
To add a query definition: