0
votes

I have this Oracle procedure:

create or replace PROCEDURE TEST  

(
p_ResultSet        OUT  INFMTTO_CURSOR.cursorType
)

AS

BEGIN
  OPEN p_ResultSet FOR
  SELECT *
  FROM V_INFOMTTO_P1_SITES;
END TEST;

A package where the cursor is declared:

create or replace PACKAGE INFMTTO_CURSOR AS 
  type cursorType is ref cursor;  
END INFMTTO_CURSOR;

If I call the procedure in SQL developer with this line:

exec TEST 

the result is empty. ¿Can you help me please?, how can I obtein the table result through the EXEC function?

Thanks a lot

1
You don't have to define the explicitly, there is a pre-defined type, simply use p_ResultSet OUT SYS_REFCURSOR - Wernfried Domscheit

1 Answers

0
votes

You need define a refcursor to recieve your data. Try this:

var r refcursor;
execute TEST( :r );
print :r;

Good luck!