<?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 tELTOracleMap connect to tELTOracleMap with context variable both in inner and outer query in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tELTOracleMap-connect-to-tELTOracleMap-with-context-variable/m-p/2271765#M49261</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I wanted to order the primary key and then select N rows - so my query looks like&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;select * from (&lt;/P&gt; 
&lt;P&gt;select * from table1 a, table2 b where a.id = b.id and mod(a.id, 3) = context.process_num order by b.id)&lt;/P&gt; 
&lt;P&gt;where rownum &amp;lt;= context.number_of_rows&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am using 2 tELTMap. The 1st tELTMap generated select query is as expected:&lt;BR /&gt;"select * from&lt;/P&gt; 
&lt;P&gt;" + "table1" + " a," + "table2"+ " b&lt;/P&gt; 
&lt;P&gt;where a.id = b.id and mod(a.id, 3) = " + context.process_num+"&lt;/P&gt; 
&lt;P&gt;order by b.id&lt;/P&gt; 
&lt;P&gt;"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But the 2nd tELTMap generated select query is as NOT expected:&lt;/P&gt; 
&lt;P&gt;"select * from (&lt;/P&gt; 
&lt;P&gt;select * from&lt;/P&gt; 
&lt;P&gt;"+ "table1"+ " a,"+ "table2" + "b&lt;/P&gt; 
&lt;P&gt;where a.id = b.id and mod(a.id, 3) = context.process_num&lt;/P&gt; 
&lt;P&gt;order by b.id) c"&lt;/P&gt; 
&lt;P&gt;+"where rownum &amp;lt;="+ context.number_of_rows&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;context.process_num becomes part of string and throws the below error:&lt;/P&gt; 
&lt;P&gt;java.sql.SQLSyntaxErrorException: ORA-00904: "CONTEXT"."PROCESS_NUM": invalid identifier&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How to resolve having&amp;nbsp;context.process_num in inner query but not inside String?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2019 10:59:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-03-19T10:59:02Z</dc:date>
    <item>
      <title>tELTOracleMap connect to tELTOracleMap with context variable both in inner and outer query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tELTOracleMap-connect-to-tELTOracleMap-with-context-variable/m-p/2271765#M49261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I wanted to order the primary key and then select N rows - so my query looks like&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;select * from (&lt;/P&gt; 
&lt;P&gt;select * from table1 a, table2 b where a.id = b.id and mod(a.id, 3) = context.process_num order by b.id)&lt;/P&gt; 
&lt;P&gt;where rownum &amp;lt;= context.number_of_rows&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am using 2 tELTMap. The 1st tELTMap generated select query is as expected:&lt;BR /&gt;"select * from&lt;/P&gt; 
&lt;P&gt;" + "table1" + " a," + "table2"+ " b&lt;/P&gt; 
&lt;P&gt;where a.id = b.id and mod(a.id, 3) = " + context.process_num+"&lt;/P&gt; 
&lt;P&gt;order by b.id&lt;/P&gt; 
&lt;P&gt;"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But the 2nd tELTMap generated select query is as NOT expected:&lt;/P&gt; 
&lt;P&gt;"select * from (&lt;/P&gt; 
&lt;P&gt;select * from&lt;/P&gt; 
&lt;P&gt;"+ "table1"+ " a,"+ "table2" + "b&lt;/P&gt; 
&lt;P&gt;where a.id = b.id and mod(a.id, 3) = context.process_num&lt;/P&gt; 
&lt;P&gt;order by b.id) c"&lt;/P&gt; 
&lt;P&gt;+"where rownum &amp;lt;="+ context.number_of_rows&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;context.process_num becomes part of string and throws the below error:&lt;/P&gt; 
&lt;P&gt;java.sql.SQLSyntaxErrorException: ORA-00904: "CONTEXT"."PROCESS_NUM": invalid identifier&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How to resolve having&amp;nbsp;context.process_num in inner query but not inside String?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 10:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tELTOracleMap-connect-to-tELTOracleMap-with-context-variable/m-p/2271765#M49261</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-19T10:59:02Z</dc:date>
    </item>
  </channel>
</rss>

