Friday, December 9, 2016

HR Assignment Query in Oracle HRMS

select * from fnd_user fu, per_all_people_f papf,
per_all_assignments_f paaf,
hr_all_positions_f hap
where user_name in ( 'H902494', 'Y598870')
and papf.person_id = fu.employee_id
AND SYSDATE BETWEEN fu.start_date AND NVL (fu.end_date, SYSDATE)
and papf.Person_Id = paaf.Person_Id                                                              
AND SYSDATE BETWEEN paaf.Effective_Start_Date AND paaf.Effective_End_Date
AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
AND SYSDATE BETWEEN hap.effective_start_date AND hap.effective_end_date
AND hap.position_id(+) = paaf.position_id
and paaf.primary_flag='Y'

No comments:

Post a Comment