Oracle Magazine, Jan/Feb 2018
Database Developer and DBA ETL 7782 CLARK 7839 7934 MILLER 7782 ORACLE MAGAZINE JANUARY FEBRUARY 2018 101 14 rows selected You might ask What then is the use of a WHERE clause in a hierarchical query The presence of a WHERE clause is still valid not to define the hierarchy but to define filtering of the data For example once the NORTH region hierarchy has been instantiated the WHERE clause requirement might be to include only those employees earning above a certain SALARY HIERARCHY ATTRIBUTES When dealing with hierarchical structures there are common questions that need to be answered about the data For the sample data in this article questions might be along the lines of Is this employee a manager That is are there any employees who report to this employee Which employee sits at the top of the hierarchy when starting a query from a given leaf With the initial set of sample data in this article KING is the sole employee who sits at the top of the hierarchy but in Listing 10 some rows have been added to demonstrate that this does not have to be the case for all hierarchies Employee DENNIS has been added who also has no manager that is he sits at the same top level as KING So it is possible that employees at the very bottom of the hierarchy structure might ultimately traverse up to a different highest manager
You must have JavaScript enabled to view digital editions.