Retrive Person Type (Mutilple)

Submitted by code_admin on Fri, 07/13/2018 - 09:39
  1. select
  2.     papf.effective_start_date,
  3.     papf.effective_end_date,
  4.     papf.employee_number,
  5.     papf.full_name,
  6.     ppt.user_person_type as person_type
  7. from per_all_people_f papf
  8. left join (
  9.     select person_id, person_type_id
  10.     from per_person_type_usages_f
  11.     where :p_effective_date between effective_Start_date and effective_end_date
  12. ) pptuf on pptuf.person_id=papf.person_id
  13. left join (
  14.     select person_type_id, user_person_type
  15.     from per_person_types
  16. ) ppt on ppt.person_type_id=pptuf.person_type_id
  17. where papf.person_id=10521
  18. and :p_effective_date between effective_Start_date and effective_end_date
RJM Article Type
Quick Reference