Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
hrdzpqkv
New Contributor II

Oracle stored procedure with Ref Cursor as out put

Murali,

Did you find out the solution to this?

Thanks in advance.

Not applicable

Oracle stored procedure with Ref Cursor as out put

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

Not applicable

Re: Oracle stored procedure with Ref Cursor as out put

Murali try the below:

ODBC CONNECT TO [Database]

Load *;SQL

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

exit script;

Regards,

Kiran.

SunilChauhan
Esteemed Contributor

Oracle stored procedure with Ref Cursor as out put

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

hrdzpqkv
New Contributor II

Re: Oracle stored procedure with Ref Cursor as out put

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?