Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to handle Oracle Stored Procedures with output cursor

Hello!

Our client has a Stored Procedure with a ref cursor as an output which has a table in it.

How can we get tha data?

gwassenaar‌ states in message 671607 that QlikView directly cannot interpret the cursor.

Does some one know what needs to be done? (An explanation as technical and precisely  as possible will be greatly appreciated)

What should I ask my client to do and provide me?

Thanks!

5 Replies
Gysbert_Wassenaar

A cursor requires that the client iterates through the cursor and processes each result row in turn. Qlikview cannot do that. It expects a recordset. If you need to use a cursor then you'll have to code a piece of software that uses the cursor and stores the result in a file. Then qlikview can read the data from the file. But first ask your client to provide you with a name of a database view or a stored procedure that returns the data you need as a recordset instead of a cursor.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi. Thanks!

"qlikview can read the data from ... a stored procedure that returns the data you need as a recordset instead of a cursor."

gwassenaar

Do you have an example of a Oracle SP like that (returns a recordset) that can be called on QlikView? I want to show it to our client so he can take that one as an example and do something based on that.

Thanks again.

maxgro
MVP
MVP

with ref cursor but I don't understand your

"which has a table in it."

Re: Oracle procedure with refcursor

Anonymous
Not applicable
Author

Hi.

The ref cursor in question (vRefCursos), at the end of the execution in Oracle it has this stored:

               FIELD1|              Field2|field3|FIELD4|Field5|field6|field7

------------------------------|------------------------------|----------|----------|----------|-----

                          2561|                          2701|19/03/2014|19/03/2014|          |          |11/06/2013|          |          |    

                          3044|                          3222|19/03/2014|19/03/2014|          |          |09/07/2013|          |          |    

                          1161|                          1281|19/03/2014|19/03/2014|          |          |06/05/2013|          |          |    

                          1181|                          1301|19/03/2014|19/03/2014|          |          |06/05/2013|          |          |    

                          1261|                          1381|19/03/2014|19/03/2014|          |          |06/05/2013|          |          |    

                          1262|                          1401|19/03/2014|19/03/2014|          |          |06/05/2013|          |          |    

                          1301|                          1462|19/03/2014|19/03/2014|          |          |06/05/2013|          |          |    

                          1381|                          1523|19/03/2014|19/03/2014|          |          |28/05/2013|          |          |    

                          1401|                          1161|19/03/2014|19/03/2014|          |          |11/09/2013|          |          |    

                          1402|                          1262|19/03/2014|19/03/2014|          |          |04/06/2013|10/05/2013|          | 

Or at least that whats printed when in Oracle they run "PRINT vRefCursor".

Regards

Gysbert_Wassenaar

See this post: SQL Stored Procedure into QlikView


talk is cheap, supply exceeds demand