16: Return varchar2 is
17:
18: Cursor C1 (c_public_notes_only varchar2) IS
19: select *
20: from cs_incidents_diary_v
21: where incident_id = p_incident_id
22: and ( note_status is null or
23: note_status <> decode(c_public_notes_only,'Y','P') or
24: note_status = decode(c_public_notes_only,'N',note_status,
26: order by last_update_date DESC;
27:
28: Cursor C2(c_public_notes_only varchar2) IS
29: select *
30: from cs_incidents_diary_v
31: where incident_id = p_incident_id
32: and ( note_status is null or
33: note_status <> decode(c_public_notes_only,'Y','P',note_status) or
34: note_status = decode(c_public_notes_only,'N',note_status,
493: and enabled_flag = 'Y'
494: and sysdate between NVL(start_date_active,sysdate) and
495: NVL(end_date_active,sysdate);
496:
497: lrec cs_incidents_diary_v%rowtype;
498:
499: l_status VARCHAR2(240);
500: l_urgency VARCHAR2(240);
501: l_severity VARCHAR2(240);