2184:
2185: --6
2186: CURSOR wlst_prf(p_usec_pri_id NUMBER) IS
2187: SELECT *
2188: FROM igs_ps_usec_wlst_prf
2189: WHERE unit_sec_waitlist_priority_id = p_usec_pri_id;
2190:
2191: --7
2192: CURSOR usec_cps( p_uoo_id NUMBER) IS
3020:
3021: -- Rollover of unit section waitlist preference records
3022: FOR wlst_prf_rec IN wlst_prf (wlst_pri_rec.unit_sec_waitlist_priority_id ) LOOP
3023: DECLARE
3024: CURSOR cur_wlst_prf_new(cp_unit_sec_wlst_priority_id igs_ps_usec_wlst_prf.unit_sec_waitlist_priority_id%TYPE,
3025: cp_preference_code igs_ps_usec_wlst_prf.preference_code%TYPE,
3026: cp_preference_version igs_ps_usec_wlst_prf.preference_version%TYPE) IS
3027: SELECT 'X'
3028: FROM igs_ps_usec_wlst_prf
3021: -- Rollover of unit section waitlist preference records
3022: FOR wlst_prf_rec IN wlst_prf (wlst_pri_rec.unit_sec_waitlist_priority_id ) LOOP
3023: DECLARE
3024: CURSOR cur_wlst_prf_new(cp_unit_sec_wlst_priority_id igs_ps_usec_wlst_prf.unit_sec_waitlist_priority_id%TYPE,
3025: cp_preference_code igs_ps_usec_wlst_prf.preference_code%TYPE,
3026: cp_preference_version igs_ps_usec_wlst_prf.preference_version%TYPE) IS
3027: SELECT 'X'
3028: FROM igs_ps_usec_wlst_prf
3029: WHERE unit_sec_waitlist_priority_id = cp_unit_sec_wlst_priority_id
3022: FOR wlst_prf_rec IN wlst_prf (wlst_pri_rec.unit_sec_waitlist_priority_id ) LOOP
3023: DECLARE
3024: CURSOR cur_wlst_prf_new(cp_unit_sec_wlst_priority_id igs_ps_usec_wlst_prf.unit_sec_waitlist_priority_id%TYPE,
3025: cp_preference_code igs_ps_usec_wlst_prf.preference_code%TYPE,
3026: cp_preference_version igs_ps_usec_wlst_prf.preference_version%TYPE) IS
3027: SELECT 'X'
3028: FROM igs_ps_usec_wlst_prf
3029: WHERE unit_sec_waitlist_priority_id = cp_unit_sec_wlst_priority_id
3030: AND preference_code = cp_preference_code
3024: CURSOR cur_wlst_prf_new(cp_unit_sec_wlst_priority_id igs_ps_usec_wlst_prf.unit_sec_waitlist_priority_id%TYPE,
3025: cp_preference_code igs_ps_usec_wlst_prf.preference_code%TYPE,
3026: cp_preference_version igs_ps_usec_wlst_prf.preference_version%TYPE) IS
3027: SELECT 'X'
3028: FROM igs_ps_usec_wlst_prf
3029: WHERE unit_sec_waitlist_priority_id = cp_unit_sec_wlst_priority_id
3030: AND preference_code = cp_preference_code
3031: AND preference_version = cp_preference_version
3032: AND ROWNUM = 1 ;
3038:
3039: OPEN cur_wlst_prf_new(NVL(l_usec_pri_id,l_cur_wlst_pri_new.unit_sec_waitlist_priority_id), wlst_prf_rec.preference_code, wlst_prf_rec.preference_version);
3040: FETCH cur_wlst_prf_new INTO l_cur_wlst_prf_new;
3041: IF cur_wlst_prf_new%NOTFOUND THEN
3042: igs_ps_usec_wlst_prf_pkg.insert_row(
3043: x_rowid => lv_rowid,
3044: x_unit_sec_waitlist_pref_id => l_usec_prf_id,
3045: x_unit_sec_wlst_priority_id => NVL(l_usec_pri_id,l_cur_wlst_pri_new.unit_sec_waitlist_priority_id),
3046: x_preference_order => wlst_prf_rec.preference_order ,