HRMS Query
1) How to fetch Employee Latest Grade?
SELECT paaf.full_name || ' ' || paaf.employee_number emp_name,
paaf.person_id emp_id, pg.NAME grade
FROM per_all_people_f paaf,
per_all_assignments_f pa,
per_grades pg,
fnd_user fu
WHERE paaf.person_id = pa.person_id
AND paaf.effective_end_date IN (SELECT MAX (paafs.effective_end_date)
FROM per_all_people_f paafs
WHERE paafs.person_id = paaf.person_id)
AND pa.effective_end_date IN (
SELECT MAX (paaf.effective_end_date)
FROM per_all_assignments_f paafs
WHERE paafs.assignment_id = pa.assignment_id
AND paafs.person_id = pa.person_id)
AND pa.grade_id(+) = pg.grade_id
AND pa.person_id = fu.employee_id
AND fu.user_id = :UserId;
2)
No comments:
Post a Comment