You are trying to access a TABLE/VIEW
that was created using a dynamic SQL
in the same block where you SELECT
it (Static SQL
)
Every PL/SQL
Block wold be compiled before execution.
And while compilation rv_task_number_view
was not available!
So, the SELECT
needs to be dynamic as well!
C2 SYS_REFCURSOR;
OPEN C2 FOR
'SELECT ct.task_id,jtf_note_id, jnv.notes,
jnv.creation_date,jnv.last_update_date
FROM
jtf_notes_vl jnv,
csf_ct_tasks ct,apps.rv_task_number_view rvt
WHERE
jnv.source_object_code = ''TASK''
and ct.task_number = jnv.source_number
and ct.task_number = rvt.task_number
order by task_id, jtf_note_id';