Using the Discoverer Execution Plan Viewing the SQL and Execution Plan with an Oracle Enterprise Edition database

Advanced Discoverer Desktop Features 8-21 Figure 8–20 Plan tab displaying the Execution Plan using a Materialized View In Figure 8–20 , you can see from the SQL Inspector Plan tab that a Materialized View Summary is being used by the database, identified by the table name EUL5_ MVSummary Identifier.

8.7.6 Configuring the SQL type used

Discoverer Desktop uses Inline Views in its SQL generation. This SQL has Inline Views removed to make external editing easier - this process is also known as ’flattening’. When you use the SQL Inspector dialog, typically you are looking at SQL with the Inline Views removed, or flattened SQL. To set the default variant, there is registry entry called HKEY_CURRENT_ USER\Software\Oracle\Discoverer 10\Database\SQLType. Set this value to configure how SQL is displayed in the SQL Inspector dialog. The valid values for this entry are 0 and 2, used as follows: 0 - Show SQL with no Inline Views flattened SQL. This is the default. 2 - Show SQL with Inline Views. To configure the SQLType registry setting:

1. From the Windows Start menu, choose Run.

2. Type regedit then choose OK.

3. Navigate to the registry setting in: HKEY_CURRENT_USER\Software\Oracle\Discoverer 10\Database\SQLType 8-22 Oracle Fusion Middleware Users Guide for Oracle Business Intelligence Discoverer Desktop Figure 8–21 Setting the SQLType Registry Setting 4. Double click on SQLType, change the setting as required to either 0, 1, or 2, see notes above, then click OK.

8.7.7 Exporting SQL without running a Workbook

You can export Workbook SQL from the command line, without running Discoverer Desktop. Refer to the Command Line Interface section of the Oracle Fusion Middleware Administrators Guide for Oracle Business Intelligence Discoverer for more details, or contact your Discoverer manager. A Calculation Examples A-1 A Calculation Examples This appendix contains the following sections: ■ Getting More Information ■ About the examples in this chapter ■ Additional formatting ■ Simple Calculation Examples ■ Analytic Function Examples ■ More about the Analytic Function Template ■ Analytic Functions and Sequencing A.1 Getting More Information For more information about Analytic Functions, and Oracle functions in general, refer to the following Oracle publications: ■ Oracle Database SQL Reference ■ Oracle Database Data Warehousing Guide A.2 About the examples in this chapter The examples in the following sections use the Discoverer Desktop sample data. A.3 Additional formatting The examples in this chapter use the following additional formatting: ■ Currency is displayed with no decimal places, and is prefixed with a Dollar sign . ■ Integers are displayed with no decimal places. For example, Ranks. A.4 Simple Calculation Examples This section provides the following examples to help you create Calculations. ■ Calculate the number of rows returned by a query ■ Calculate a 25 increase in sales ■ Convert text to upper-case A-2 Oracle Fusion Middleware Users Guide for Oracle Business Intelligence Discoverer Desktop A.4.1 Calculate the number of rows returned by a query This example calculates the number of rows returned by a query. A.4.2 Calculate a 25 increase in sales This example calculates a 25 increase in sales figures. Note: For more information on how to create Calculations, refer to Creating Calculations . Workbook options Details Select Items Video Analysis Information: Year Calendar Year, Region, City, Sales SUM Sort Order Year, Region, City Conditions Department = Video Sale OR Department = Video Rental Year = 2000 AND Region = Central Calculation Name Rows returned Calculation ROWCOUNT Notes ROWCOUNT does not count NULL values. To calculate the number of rows returned by a query, including NULL values, first create a temporary item One record, Calculation = ‘1’. Then, create a Calculation Rows returned to count the occurrences of One record, SUMVideo Sales Analysis.One record Display Data Workbook options Details Select Items Video Analysis Information: Year Calendar Year, Region, City, Sales SUM Sort Order Year, Region, City Conditions Department = Video Sale OR Department = Video Rental Year = 2000 AND Region = Central Calculation Name 25 Increase Calculation Sales SUM 1.25 Display Data