Passthrough query: Oracle procedure w/ ref cursor

S

sck10

Hello,

I am trying to create a passthrough query for calling an Oracle procedure
that uses a sys_refcursor:


BEGIN
EXPORT_EXCEL_SPROC(inout, 'ExportDynamicToExcel', 'NoParameter', '4',
'40', 'NoParameter');
END;

When I try to run this, I get the error:
Identifier 'InOut' must be declared OrA-06550:

Any suggestions would be appreciated.

Thanks, sck10


Oracle Procedure:

create or replace
PROCEDURE EXPORT_EXCEL_SPROC
(v_cursor IN OUT SYS_REFCURSOR,
v_Parm01 IN VARCHAR2,
v_Parm02 IN VARCHAR2,
v_Parm03 IN VARCHAR2,
v_Parm04 IN VARCHAR2
)
AS

n_timecode00 NUMBER;
n_timecode01 NUMBER;

BEGIN

--Retreive the Max timecode for actuals
SELECT MAX(Time_Code) INTO n_timecode01 FROM Sales_Actuals;
SELECT CAST(n_timecode01/10 AS int) * 10 INTO n_timecode00 FROM dual;


IF v_Parm01 = 'TestTimeCode'
THEN
OPEN v_cursor FOR
SELECT n_timecode00 AS n_timecode00, n_timecode01 AS n_timecode01 FROM
dual;
END IF;

END;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top