You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started: AI Resources for Oracle Cloud HCM – Go Here

Progress with Redwood: Redwood Resources for Oracle Cloud HCM -  Go Here

SQL Script for Worker's department

edited Nov 22, 2017 9:27AM in Reporting and Analytics for HCM 4 comments

Content

Hi All,

I am trying to get the worker's department along with his name, person number, manager etc. I use the following script to get the department;

SELECT DISTINCT pd.NAME
                           FROM per_all_assignments_f po,
                                hr_all_organization_units pd
                          WHERE 1 = 1
                            AND po.person_id = a.worker_id
                            AND po.assignment_id = a.assignment_id
                            AND po.organization_id = pd.organization_id
                            AND po.business_group_id = pd.business_group_id
                            AND ROWNUM = 1

But this way it returns the department when the employee was assigned very first. Never returns employee's current department. I wonder why it has been so hard to query an employee's department.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!