I've been trying to view a resultset from a stored procedure call in SQL Developer, but all I can see in "Script Output" tab are the result set's column names. The same code in Toad displays the records in "Grid" but I'm having trouble displaying the same output in SQL Developer.
Code I'm using as follows:
create or replace PROCEDURE test_proc (
r_recordset OUT SYS_REFCURSOR)
IS
sql_stmt CLOB := NULL;
BEGIN
sql_stmt :=
'select * from test_table';
OPEN r_recordset FOR sql_stmt;
END;
then
set serveroutput on;
variable Out_Ref_Cursor refcursor;
EXECUTE test_proc(:Out_Ref_Cursor);
print :Out_Ref_Cursor;
I've turn on DBMS output and connected it to the database but there's absolutely nothing displayed in that window. Buffer size is 20000. Like this answer suggests: Printing the value of a variable in SQL Developer I'm wondering if I'm missing a setting or a view. FYI: total number of records in test_table are 48.
I have also tried
DECLARE
Out_Ref_Cursor refcursor
BEGIN
test_proc (:Out_Ref_Cursor);
dbms_output.put_line(Out_Ref_Cursor);
END;