975:
976: select count(*)
977: into l_to_employee_id_exists
978: from per_periods_of_service s, 979: per_people_f p 980: where p.person_id = p_to_employee_id
981: and p.person_id = s.person_id
982: and trunc(sysdate) between p.effective_start_date
983: and p.effective_end_date