OracleFree generatorPDF, Excel, Word exportOracle E-Business Suite

Oracle EBS Employee Table and HRMS Tables: Date-Tracked SQL Generator

The Oracle EBS employee table is PER_ALL_PEOPLE_F, but a plain select returns every historic version of every person. This generator builds the join to assignments, organization, job and supervisor with the date-track filter applied to each table.

Fill in

Use TRUNC(SYSDATE) for today, or TO_DATE('2026-03-31','YYYY-MM-DD') for a past date.

BUSINESS_GROUP_ID from HR_ALL_ORGANIZATION_UNITS. 202 is the Vision demo value.

Use % for everyone or SMITH% for a prefix.

Generated code
Download:

Current employees with assignment, organization, job and supervisor

SELECT p.person_id,
       p.employee_number,
       p.full_name,
       p.email_address,
       a.assignment_id,
       a.assignment_number,
       o.name        AS organization,
       j.name        AS job,
       s.full_name   AS supervisor,
       p.effective_start_date AS person_from,
       a.effective_start_date AS assignment_from
FROM   per_all_people_f      p
       JOIN per_all_assignments_f a
         ON a.person_id = p.person_id
        AND a.assignment_type = 'E'
        AND a.primary_flag = 'Y'
        AND TRUNC(SYSDATE) BETWEEN a.effective_start_date AND a.effective_end_date
       LEFT JOIN hr_all_organization_units o
         ON o.organization_id = a.organization_id
       LEFT JOIN per_jobs_vl j
         ON j.job_id = a.job_id
       LEFT JOIN per_all_people_f s
         ON s.person_id = a.supervisor_id
        AND TRUNC(SYSDATE) BETWEEN s.effective_start_date AND s.effective_end_date
WHERE  p.business_group_id = 202
 AND   p.current_employee_flag = 'Y'
 AND   p.last_name LIKE UPPER('%')
 AND   TRUNC(SYSDATE) BETWEEN p.effective_start_date AND p.effective_end_date
ORDER BY p.full_name
FETCH FIRST 200 ROWS ONLY;

Full history of one person (all date-tracked rows)

SELECT person_id, employee_number, last_name, first_name,
       effective_start_date, effective_end_date
FROM   per_all_people_f
WHERE  person_id = :person_id
ORDER BY effective_start_date;

Link an application user to the employee record

SELECT u.user_name, u.employee_id AS person_id, p.full_name
FROM   fnd_user u
       JOIN per_all_people_f p
         ON p.person_id = u.employee_id
        AND TRUNC(SYSDATE) BETWEEN p.effective_start_date AND p.effective_end_date
WHERE  u.end_date IS NULL OR u.end_date > TRUNC(SYSDATE);

Verify names against your release in the eTRM. FETCH FIRST needs Oracle Database 12c or later; on 11g use ROWNUM. Last name values are stored in upper or mixed case depending on setup. Run against a non-production copy first and respect HR data access rules.

Ask HR and approval-chain questions in plain English

Optional: a private AI layer that turns questions into reviewed read-only EBS queries.

Optional. The tool and every export work without this. No spam.

How to use the generator

Set the as-of date, business group and an optional last name filter, then copy the query into SQL Developer or TOAD. The as-of expression is reused in every date-tracked join, which is the part people most often forget. Leave it as TRUNC(SYSDATE) for current data, or enter a past date to see who worked where at that time. The second and third blocks show the full history of a person and the link between FND_USER and the employee.

The core HRMS tables

People live in PER_ALL_PEOPLE_F (one row per person per date range, key PERSON_ID plus EFFECTIVE_START_DATE). Jobs and positions of work are in PER_ALL_ASSIGNMENTS_F, which holds ORGANIZATION_ID, JOB_ID, POSITION_ID, LOCATION_ID, GRADE_ID and SUPERVISOR_ID. Employment spans are in PER_PERIODS_OF_SERVICE. Reference tables include HR_ALL_ORGANIZATION_UNITS, PER_JOBS, HR_ALL_POSITIONS_F, HR_LOCATIONS_ALL, PER_ADDRESSES and PER_PHONES.

  • PER_ALL_PEOPLE_F: person, name, employee number, email
  • PER_ALL_ASSIGNMENTS_F: organization, job, position, supervisor
  • PER_PERIODS_OF_SERVICE: hire and termination dates
  • FND_USER.EMPLOYEE_ID: links a login to PERSON_ID

Date-track patterns that avoid duplicates

A date-tracked table keeps one row for each period a version of the data was true. Any join to it needs a filter such as the as-of date between EFFECTIVE_START_DATE and EFFECTIVE_END_DATE. Without it, a person with five name or assignment changes appears five times. Also filter ASSIGNMENT_TYPE = 'E' and PRIMARY_FLAG = 'Y' to avoid contingent worker and secondary assignment rows, and use CURRENT_EMPLOYEE_FLAG for active employees.

Common mistakes

Using the unsuffixed PER_PEOPLE_F or PER_ASSIGNMENTS_F views without knowing they depend on session date and business group. Joining supervisor with no date filter. Treating EMPLOYEE_NUMBER as unique across business groups. Reading personal data without the access controls your HR team requires. Counting rows from PER_ALL_PEOPLE_F as headcount, which includes ex-employees, applicants and contingent workers.

Frequently Asked Questions

What is the employee table in Oracle EBS?

PER_ALL_PEOPLE_F holds people, including employees, ex-employees, applicants and contingent workers. Employment details such as organization, job and supervisor are in PER_ALL_ASSIGNMENTS_F. Both are date-tracked, so every query needs an effective date filter.

Why do I get duplicate employees in my query?

Because date-tracked tables keep a row for every historic version. Add AS-OF BETWEEN EFFECTIVE_START_DATE AND EFFECTIVE_END_DATE to each date-tracked table in the join, and restrict assignments to the primary employee assignment.

How do I link an EBS user to an employee?

FND_USER.EMPLOYEE_ID stores the PERSON_ID of the linked person. Join it to PER_ALL_PEOPLE_F with the date filter. Some users, such as service accounts, have no employee link, so use a left join if you need all users.

Does this work for contingent workers?

Not directly. Contingent workers use assignment type C and the current npw flag instead of current employee flag. Change the assignment type and flag in the where clause to report on them, subject to your HR data rules.

If HR and operations teams keep asking IT for the same employee and approval-chain reports, a private AI layer over EBS can answer them on your own servers while honoring existing access roles.

Keep exploring

Free tools

ERP fixes and how-tos

Runs with your ERP

AI on your ERP

Integrations

Software