<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Oracle procedure with refcursor in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761559#M666186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need execute an Oracle SP with refcursor as output, something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCHEMA.SP_NAME (Par1, Par2, CURSOR_OUTPUT);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried all of these:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;SQL CALL SCHEMA.SP_NAME ('$(var1)', '$(var2)', '$(var3)');&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SQL CALL SCHEMA.SP_NAME ('$(var1)', '$(var2)');&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;select SCHEMA.SQL CALL SP_NAME('$(var1)', '$(var2)') as output from SCHEMA;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SQL {? = CALL SCHEMA.SP_NAME('$(var1)', '$(var2)', '$(var3)') } ;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;SQL select SCHEMA.SP_NAME('$(var1)', '$(var2)', '$(var3)') from dual;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And anything works, any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ariel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Dec 2014 19:29:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-12-02T19:29:40Z</dc:date>
    <item>
      <title>Oracle procedure with refcursor</title>
      <link>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761559#M666186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need execute an Oracle SP with refcursor as output, something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCHEMA.SP_NAME (Par1, Par2, CURSOR_OUTPUT);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried all of these:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;SQL CALL SCHEMA.SP_NAME ('$(var1)', '$(var2)', '$(var3)');&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SQL CALL SCHEMA.SP_NAME ('$(var1)', '$(var2)');&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;select SCHEMA.SQL CALL SP_NAME('$(var1)', '$(var2)') as output from SCHEMA;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SQL {? = CALL SCHEMA.SP_NAME('$(var1)', '$(var2)', '$(var3)') } ;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;SQL select SCHEMA.SP_NAME('$(var1)', '$(var2)', '$(var3)') from dual;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And anything works, any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ariel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 19:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761559#M666186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T19:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle procedure with refcursor</title>
      <link>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761560#M666187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Qlikview can't do anything with a cursor reference. I think you'll have to wrap that SP in another SP that runs through the cursor and returns a set of records instead of a cursor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2014 12:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761560#M666187</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-03T12:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle procedure with refcursor</title>
      <link>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761561#M666188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friend!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the operation of the cursor I do not know if it will work as our friend quoted. Now about calling procedures from within QlikView, if you have not achieved, you can try the way that I will describe below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Step 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Set your script editor and it will open the databases in read and write mode.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Configuração do Script.jpg" class="jive-image image-1" src="/legacyfs/online/84712_Configuração do Script.jpg" style="font-size: 10pt; line-height: 1.5em; height: 154px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Step 2:&lt;/P&gt;&lt;P&gt;Correctly write your connection string, it is ODBC or OLEDB, add, before or after the password the following content&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;"&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM style="text-decoration: underline;"&gt;Mode is write&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="String Conexão ODBC.jpg" class="jive-image image-2" src="/legacyfs/online/84737_String Conexão ODBC.jpg" style="height: 30px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Step 3:&lt;/P&gt;&lt;P&gt;Write correctly the call of Procedure that you want to call, in my example will look like this ...&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM&gt;"&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SQL &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;call user_bi.prc_custo_padrão_real('4.2014','007');&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;&lt;EM&gt;"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;IMG alt="Chamada da Procedure.jpg" class="jive-image image-3" src="/legacyfs/online/84738_Chamada da Procedure.jpg" style="height: 58px; width: 620px;" /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I think this should work, I have helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hug!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 16:43:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761561#M666188</guid>
      <dc:creator>offjunior</dc:creator>
      <dc:date>2015-04-23T16:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle procedure with refcursor</title>
      <link>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761562#M666189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is an old post, anyway, with an ODBC connection this works in my environment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// QlikView&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set vTable='%E%';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL {? = CALL pkg1.f_get_tables2('$(vTable)') } ; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// Oracle&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CREATE OR REPLACE PACKAGE TEST.pkg1 AS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;TYPE t_cursor IS REF CURSOR;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="line-height: 1.5em; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function f_get_tables2 (p_table varchar2) return t_cursor;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="line-height: 1.5em; font-size: 10pt;"&gt;END pkg1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CREATE OR REPLACE PACKAGE BODY TEST.pkg1 AS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;function f_get_tables2 (p_table varchar2) return t_cursor&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; c1 t_cursor;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;BEGIN&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPEN C1 FOR&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT TABLE_NAME FROM user_tables where table_name like p_table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURN C1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;END;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; END pkg1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 19:35:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Oracle-procedure-with-refcursor/m-p/761562#M666189</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-04-23T19:35:59Z</dc:date>
    </item>
  </channel>
</rss>

