1782: l_exists VARCHAR2(1);
1783:
1784: cursor c1 is
1785: select 'x'
1786: from per_all_people_f pp
1787: where nvl(p_date_start,nvl(p_proj_start,p_sess)) >=
1788: (select min(ppf.effective_start_date)
1789: from per_all_people_f ppf
1790: where pp.person_id = ppf.person_id
1785: select 'x'
1786: from per_all_people_f pp
1787: where nvl(p_date_start,nvl(p_proj_start,p_sess)) >=
1788: (select min(ppf.effective_start_date)
1789: from per_all_people_f ppf
1790: where pp.person_id = ppf.person_id
1791: and pp.current_employee_flag = ppf.current_employee_flag)
1792: and nvl(p_date_end,nvl(p_proj_end,p_sess)) <=
1793: (select max(ppf.effective_end_date)
1790: where pp.person_id = ppf.person_id
1791: and pp.current_employee_flag = ppf.current_employee_flag)
1792: and nvl(p_date_end,nvl(p_proj_end,p_sess)) <=
1793: (select max(ppf.effective_end_date)
1794: from per_all_people_f ppf
1795: where pp.person_id = ppf.person_id
1796: and pp.current_employee_flag = ppf.current_employee_flag)
1797: -- where nvl(p_date_start,nvl(p_proj_start,p_sess)) between
1798: -- pp.effective_start_date and pp.effective_end_date
1828: l_exists VARCHAR2(1);
1829:
1830: cursor c3 is
1831: select 'x'
1832: from per_all_people_f pp
1833: where nvl(p_date_start,nvl(p_date_proj_start,p_sess)) >=
1834: (select min(ppf.effective_start_date)
1835: from per_all_people_f ppf
1836: where pp.person_id = ppf.person_id
1831: select 'x'
1832: from per_all_people_f pp
1833: where nvl(p_date_start,nvl(p_date_proj_start,p_sess)) >=
1834: (select min(ppf.effective_start_date)
1835: from per_all_people_f ppf
1836: where pp.person_id = ppf.person_id
1837: and pp.current_employee_flag = ppf.current_employee_flag)
1838: and nvl(p_date_end,nvl(p_date_proj_end,p_sess)) <=
1839: (select max(ppf.effective_end_date)
1836: where pp.person_id = ppf.person_id
1837: and pp.current_employee_flag = ppf.current_employee_flag)
1838: and nvl(p_date_end,nvl(p_date_proj_end,p_sess)) <=
1839: (select max(ppf.effective_end_date)
1840: from per_all_people_f ppf
1841: where pp.person_id = ppf.person_id
1842: and pp.current_employee_flag = ppf.current_employee_flag)
1843: -- where nvl(p_date_start,nvl(p_date_proj_start,p_sess)) between
1844: -- pp.effective_start_date and pp.effective_end_date