<?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 Re: Help! Database Query with Context variable Oracle in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Help-Database-Query-with-Context-variable-Oracle/m-p/2258579#M40340</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPT8AAO"&gt;@kullboys12&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you query is working in Oracle DB ?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you please post the screenshot if you don't mind. Also, share your job's schema screenshot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;
&lt;P&gt;Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2019 07:19:20 GMT</pubDate>
    <dc:creator>joearun4u</dc:creator>
    <dc:date>2019-04-15T07:19:20Z</dc:date>
    <item>
      <title>Help! Database Query with Context variable Oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-Database-Query-with-Context-variable-Oracle/m-p/2258578#M40339</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I have a problem with a query in the tDBInput oracle component, the error is as follows:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Exception in component tDBInput_1 (TASK1_PREVALIDACION_PRES_ARL)&lt;/P&gt; 
&lt;P&gt;java.sql.SQLSyntaxErrorException: ORA-00933: comando SQL no terminado correctamente&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;From what I was reading, it is due to the use of context variables in the query, I would like them to help me know what I have wrong in the following query:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"SELECT NUMDOCCIA,CODIGOCIA&lt;BR /&gt;FROM (&lt;BR /&gt;SELECT 1 AS INDICE,NUMDOCCIA , CODOGOCIA AS CODIGOCIA&lt;BR /&gt;FROM ARL_COMPANIA&lt;BR /&gt;WHERE DIRECTCIA='"+context.DIRECTORIO_CIA+"'&lt;BR /&gt;UNION&lt;BR /&gt;SELECT 2 AS INDICE, NUMDOCCIA , CODOGOCIA AS CODIGOCIA&lt;BR /&gt;FROM ARL_COMPANIA&lt;BR /&gt;WHERE NUMDOCCIA='"+context.NI_ENTIDAD_ARCHIVO+"'&lt;BR /&gt;) D1&lt;BR /&gt;ORDER BY INDICE&lt;BR /&gt;FETCH FIRST 1 ROWS ONLY"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;A href="http://www.billion.uk.com/forum/viewtopic.php?f=17&amp;amp;t=13528" target="_self" rel="nofollow noopener noreferrer"&gt;.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 05:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-Database-Query-with-Context-variable-Oracle/m-p/2258578#M40339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-15T05:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help! Database Query with Context variable Oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-Database-Query-with-Context-variable-Oracle/m-p/2258579#M40340</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPT8AAO"&gt;@kullboys12&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you query is working in Oracle DB ?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you please post the screenshot if you don't mind. Also, share your job's schema screenshot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;
&lt;P&gt;Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 07:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-Database-Query-with-Context-variable-Oracle/m-p/2258579#M40340</guid>
      <dc:creator>joearun4u</dc:creator>
      <dc:date>2019-04-15T07:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help! Database Query with Context variable Oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-Database-Query-with-Context-variable-Oracle/m-p/2258580#M40341</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; You are doing order by indice column but it is not present in the outer query. This could be the issue. Did you try to run the same query in Oracle SQL Developer before adding to Talend?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Also you can change the last clause as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;fetch first row only;&lt;/PRE&gt;
&lt;P&gt;These precautions should resolve your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt;
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 10:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-Database-Query-with-Context-variable-Oracle/m-p/2258580#M40341</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-18T10:48:22Z</dc:date>
    </item>
  </channel>
</rss>

