520: */
521: cursor lc_return_note IS
522: select jtf_note_id
523: from (select jtf_note_id 524: from jtf_notes_vl 525: where source_object_id = p_referral_id
526: and source_object_code = p_approval_entity
527: order by entered_date desc)
528: where rownum = 1;