Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Interactive Report with Heirarchy

MebuFeb 2 2016 — edited Feb 3 2016

Hi,

In Apex Oracle 5.1,I tried using an  interactive report to display employee details based on Hierarchy. I have used the below query to display data:

     SELECT last_name, employee_id, manager_id, LEVEL

      FROM employees

      START WITH employee_id = 100

      CONNECT BY PRIOR employee_id = manager_id

      ORDER SIBLINGS BY last_name;

The output was as below :

LAST_NAME                 EMPLOYEE_ID       MANAGER_ID      LEVEL

------------------------- ----------- ---------- ----------

King                                100                                                       1

Cambrault                        148                                 100                 2

Bates                              172                                 148                 3

Bloom                             169                                  148                3

Fox                                 170                                  148                3

Kumar                             173                                  148                3

Ozer                                168                                  148               3

Smith                               171                                  148              3

De Haan                           102                                   100             2

Hunold                              103                                   102             3

Austin                               105                                   103             4

Ernst                                 104                                   103             4

Lorentz                              107                                   103             4

Pataballa                           106                                    103            4

Errazuriz                           147                                   100              2

Ande                                 166                                    147             3

Banda                               167                                     147             3

...

Now, i would like to display data based on Login of employees.

For example(based on above query): If an employee named - Cambrault is login,only employees under him (Bates,Bloom ,Fox ,Kumar ,Smith,Ozer) and his own details should display in the report.

Kindly advise.

regards,

mebu

This post has been answered by fac586 on Feb 3 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2016
Added on Feb 2 2016
6 comments
1,457 views