Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Oracle stored procedure with Ref Cursor as out put

Hi,

I have the following stored procedure in Oracle. How can I execute this in QlikView to load the data.

CREATE OR REPLACE PROCEDURE Test(reportno IN NUMBER, p_cur OUT sys_refcursor)

IS
BEGIN
IF reportno = 1 THEN
BEGIN 
  OPEN p_cur FOR
  Select statement comes here;
END;
ELSE IF reportno = 2 THEN
BEGIN
  OPEN p_cur FOR
  Select statement comes here;
END;
END IF;
END IF;
END Test;

Thanks in advance for your help.

Regards,

Murali

5 Replies
Anonymous
Not applicable
Author

Murali,

Did you find out the solution to this?

Thanks in advance.

Not applicable
Author

No. I didn't get any solution for this.

Not applicable
Author

Murali try the below:

ODBC CONNECT TO [Database]

Load *;SQL

Execute [Schema].[Procedure] (<reportno>);

exit script;

Regards,

Kiran.

SunilChauhan
Champion
Champion

load*;

select

a,

b,

c,

d,

e,

T.test(arg1,arg2) as StoreprocedureCalling

from T.tablename

fetch above select statement using Connection to database and

add a field  as

T.test(arg1,arg2) as StoreprocedureCalling

T is nothing but Schemaname

hope this help

Sunil Chauhan
Anonymous
Not applicable
Author

I tested both codes and didn't work.

This is the call on Toad:

DECLARE

  V_output  SYS_REFCURSOR;

BEGIN

  Schema.StoreProcedureName(numparam1, charparam2L, :V_output );

END;

Any idea how to call it on QlikView?