Edit the hierarchy as required. Click OK.

13-14 Oracle Fusion Middleware Administrators Guide for Oracle Business Intelligence Discoverer 3. Choose Edit | Edit... to display the Edit Hierarchy dialog: Name tab . 4. Click the Edit Hierarchy dialog: Items tab select date items that will use this date hierarchy and replace each ’RR’ date format with a ’YYYY’ date format. Note: Repeat the above steps for each affected default date hierarchy. 5. Click OK to save your changes. After you apply the ’YYYY’ format to the affected default date hierarchy, you can remove remaining date items that use the date format ’RR’. Remove remaining date items that use the date format ’RR’ To remove date items that use the date format ’RR’:

1.

Click the Workarea: Data tab . 2. Highlight a date item that uses the date format ’RR’. 3. Choose Edit | Delete to delete the affected date item. 4. Repeat the above steps for each date item that still uses the date format ’RR’. About creating a hierarchy using the CONNECT BY clause in a custom folder A database table might contain a recursive hierarchy, that is where a relationship exists between different records in one table. This form of hierarchy is not unlike a series of self joins and it cannot be used directly by Discoverer sometimes described as a value hierarchy. However, you can make Discoverer use a recursive hierarchy if you create a custom folder and use the CONNECT BY clause. For example, if you look at the emp table in the Scott schema supplied with Oracle databases, some of the numbers appear in both of the columns empno and mgr. The numbers appear in both columns because an employees manager is identified by the employee number. This illustrates how a recursive hierarchy exists in the emp table. The table below illustrates the relationships that exist between rows in the columns empno, ename and mgr from the emp table. EMPNO ENAME MGR 7369 SMITH 7902 7499 ALLEN 7698 7521 WARD 7698 7566 JONES 7839 7654 MARTIN 7698 7698 BLAKE 7839 7782 CLARK 7839 7788 SCOTT 7566 7839 KING 7844 TURNER 7698 7876 ADAMS 7788 7900 JAMES 7698 Creating and Maintaining Hierarchies 13-15 Discoverer cannot create a hierarchy directly using the above table. However, you can create a hierarchy from this table if you first use the CONNECT BY clause of the SELECT statement to create a custom folder. You can then use the custom folder as the basis of a hierarchy that Discoverer can use. To create a hierarchy in Discoverer that uses the information in the above table, you would need a table that is similar to the following table that Discoverer might use to create a hierarchy: The above table displays the name of an employee ename and all the managers for that employee. In this table Miller has two levels of manager, his immediate manager being Clark. To create a table like the one above that is, based on columns from the emp table and subsequently create a hierarchy between the levels, complete the following task: ■ How to create a hierarchy with a custom folder and the CONNECT BY clause, using the emp table from the scott schema How to create a hierarchy with a custom folder and the CONNECT BY clause, using the emp table from the scott schema You might want to create a hierarchy based on values in a table for example, the emp table in the scott schema. Discoverer Plus users will be able to create workbooks and use this hierarchy to drill up and down between the different levels of employees. To create a hierarchy, with a custom folder and the CONNECT BY clause, using the emp table from the scott schema:

1.

Create a custom folder and name it Recursive Hierarchy using the following SQL statement for more information, see How to create custom folders : SELECT DISTINCT empno, mgr, level FROM scott.emp CONNECT BY mgr = PRIOR empno START WITH mgr IS NULL The above SQL statement creates a table that contains the following result set: 7902 FORD 7566 7934 MILLER 7782 TOP_LEVEL 2nd_LEVEL Nth_LEVEL EMPNO ENAME KING CLARK 7934 MILLER EMPNO MGR LEVEL 7369 7902 4 7499 7698 3 7521 7698 3 7566 7839 2 7654 7698 3 EMPNO ENAME MGR