129:
130: /* Student status flag */
131: CURSOR student_cur IS
132: SELECT DECODE(student_status,null,null,'Y')
133: FROM per_all_people_f
134: WHERE TRUNC(p_effective_date)
135: BETWEEN effective_start_date AND effective_end_date
136: AND p_person_id = person_id;
137:
218: SELECT distinct person_id, effective_date
219: FROM
220: (SELECT person_id person_id
221: ,effective_start_date effective_date
222: FROM per_all_people_f
223: UNION
224: SELECT person_id
225: ,effective_start_date
226: FROM per_person_type_usages_f
240: /* Variable to hold the constructed person type primary key */
241: l_person_type_pk hri_person_type_cmbns.person_type_pk%TYPE;
242:
243: /* Variables to hold information from cursors */
244: l_person_id per_all_people_f.person_id%TYPE;
245: l_effective_date per_all_people_f.effective_start_date%TYPE;
246: l_row_exists NUMBER; -- Whether or not a row already exists
247:
248: BEGIN
241: l_person_type_pk hri_person_type_cmbns.person_type_pk%TYPE;
242:
243: /* Variables to hold information from cursors */
244: l_person_id per_all_people_f.person_id%TYPE;
245: l_effective_date per_all_people_f.effective_start_date%TYPE;
246: l_row_exists NUMBER; -- Whether or not a row already exists
247:
248: BEGIN
249: