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