plsql - Invalid cursor exception in 2nd iteration -
i getting invalid cursor exception while iterating 2nd time.
load_table_ref_cursor(v_tariff_table_rows); -- v_tariff_table_rows sys_refcursor.
when doing iteration below.
load_table_ref_cursor(v_tariff_table_rows); loop fetch v_tariff_table_rows tak_row; exit when v_tariff_table_rows%notfound; end loop;
the control inside loop going 1st time fine , throwing exception invalid cursor @ fetch statement 2nd time.
could tell whats wrong 2nd iteration.
invalid cursor
error produced when; fetch cursor before opening cursor. fetch cursor after closing cursor. close cursor before opening cursor.
load_table_ref_cursor(v_tariff_table_rows); open v_tariff_table_rows; -- use v_tariff_table_rows close v_tariff_table_rows;
Comments
Post a Comment