Query to fetch Email Details of Employee
select papf.person_number,
ppnf.full_name
employee_full_name,
pea.email_address,
per_extract_utility.get_decoded_lookup('EMAIL_TYPE', pea.email_type)
email_type
from per_all_people_f papf,
per_email_addresses pea,
per_person_names_f ppnf
where 1 = 1
and trunc(sysdate) between papf.effective_start_date and
papf.effective_end_date
and papf.person_id = ppnf.person_id
and trunc(sysdate) between ppnf.effective_start_date and
ppnf.effective_end_date
and ppnf.name_type = 'GLOBAL'
and papf.person_id = pea.person_id
and trunc(sysdate) between trunc(pea.date_from)
ppnf.full_name
employee_full_name,
pea.email_address,
per_extract_utility.get_decoded_lookup('EMAIL_TYPE', pea.email_type)
email_type
from per_all_people_f papf,
per_email_addresses pea,
per_person_names_f ppnf
where 1 = 1
and trunc(sysdate) between papf.effective_start_date and
papf.effective_end_date
and papf.person_id = ppnf.person_id
and trunc(sysdate) between ppnf.effective_start_date and
ppnf.effective_end_date
and ppnf.name_type = 'GLOBAL'
and papf.person_id = pea.person_id
and trunc(sysdate) between trunc(pea.date_from)
and nvl(trunc(pea.date_to), trunc(sysdate))
No comments:
Post a Comment