603: CURSOR get_last_entered_note IS
604: SELECT notes.notes
605: FROM jtf_notes_tl notes
606: WHERE notes.jtf_note_id = (SELECT max(note.jtf_note_id)
607: FROM jtf_notes_b note
608: WHERE note.source_object_code ='LNS_LOAN'
609: AND note.source_object_id = p_loan_id
610: )
611: AND notes.language = USERENV('LANG');
1089: CURSOR get_agent_approval_comment IS
1090: SELECT notes.notes
1091: FROM jtf_notes_tl notes
1092: WHERE notes.jtf_note_id = (SELECT max(note.jtf_note_id)
1093: FROM jtf_notes_b note
1094: WHERE note.source_object_code ='LNS_LOAN'
1095: AND note.source_object_id = p_loan_id
1096: )
1097: AND notes.language = USERENV('LANG');