6 Replies Latest reply: Dec 30, 2015 5:57 AM by Gysbert Wassenaar RSS

    How to handle Oracle Stored Procedures with output cursor

    Roberto Medellin

      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!

        • Re: How to handle Oracle Stored Procedures with output cursor
          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.

          • Re: How to handle Oracle Stored Procedures with output cursor
            Massimo Grossi

            with ref cursor but I don't understand your

            "which has a table in it."

            Re: Oracle procedure with refcursor

              • Re: How to handle Oracle Stored Procedures with output cursor
                Roberto Medellin

                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