I want to loop results from stored procedure. My code:
set serveroutput on
VAR c_curs refcursor;
EXECUTE pck_prov.get_value_type_list(1, :c_curs);
BEGIN
FOR record_test IN c_curs LOOP
dbms_output.put_line(record_test.id);
END LOOP;
END;
I don't understand why this is throwing error that c_curs must be declared:
Error starting at line : 7 in command - BEGIN
FOR record_test IN c_curs LOOP dbms_output.put_line(record_test.id); END LOOP;END;
Error report -ORA-06550: line 2, column 24:
PLS-00201: identifier 'C_CURS' must be declared