94: -- The default is based on the last outcome against the SUA:
95: -- if finalised, the default is finalised; if no finalised,
96: -- or there is no prior outcome, the default is unfinalised.
97: DECLARE
98: v_finalised_outcome_ind igs_as_su_stmptout_all.finalised_outcome_ind%TYPE;
99: CURSOR c_suao IS
100: SELECT suao.finalised_outcome_ind
101: FROM igs_as_su_stmptout suao
102: WHERE suao.person_id = p_person_id
97: DECLARE
98: v_finalised_outcome_ind igs_as_su_stmptout_all.finalised_outcome_ind%TYPE;
99: CURSOR c_suao IS
100: SELECT suao.finalised_outcome_ind
101: FROM igs_as_su_stmptout suao
102: WHERE suao.person_id = p_person_id
103: AND suao.course_cd = p_course_cd
104: AND suao.uoo_id = p_uoo_id
105: ORDER BY suao.outcome_dt DESC;