<?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: How to use java var on SQL query ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354683#M120597</link>
    <description>&lt;P&gt;Hello, and thanks for the solution, its working, but now, I want to get this result of my query and add to the other query&amp;nbsp; Its be like&lt;/P&gt;&lt;PRE&gt;Insert into my_table (table1,table2table3) 
Values("Her the result of my first query","test",1)&lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Feb 2018 09:16:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-12T09:16:14Z</dc:date>
    <item>
      <title>How to use java var on SQL query ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354681#M120595</link>
      <description>&lt;P&gt;Hello,&amp;nbsp; I have on my tXMLMap,some values , and with this values, I would like to make a sql query to get the id on the table and insert this id to an another SQL query .&lt;/P&gt; 
&lt;P&gt;First, I used tSetGlobalVar, but in my sql query ( Oracle Row) it doing nothing.&lt;/P&gt; 
&lt;P&gt;My query is like&lt;/P&gt; 
&lt;PRE&gt;"SELECT max(my_table_name) as table_id FROM table WHERE  table.name =' " + id  + "' &lt;/PRE&gt; 
&lt;P&gt;ID was the name of my SetGlobalVar , I use&lt;/P&gt; 
&lt;PRE&gt;StringHandling.UPCASE(row2.USERNAME) &lt;/PRE&gt; 
&lt;P&gt;for the Value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I use the query and insert into the tOracleOutput ? &lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tos.PNG" style="width: 684px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsYN.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147470iCB968C405CA69BE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsYN.png" alt="0683p000009LsYN.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 08:55:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354681#M120595</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-12T08:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use java var on SQL query ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354682#M120596</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you have a global variable called "id" you have to change your query like this one:&lt;/P&gt;&lt;PRE&gt;"SELECT max(my_table_name) as table_id FROM table WHERE  table.name = '" + (String)globalMap.get("id")  + "'"&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 09:00:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354682#M120596</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-02-12T09:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use java var on SQL query ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354683#M120597</link>
      <description>&lt;P&gt;Hello, and thanks for the solution, its working, but now, I want to get this result of my query and add to the other query&amp;nbsp; Its be like&lt;/P&gt;&lt;PRE&gt;Insert into my_table (table1,table2table3) 
Values("Her the result of my first query","test",1)&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Feb 2018 09:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354683#M120597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-12T09:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use java var on SQL query ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354684#M120598</link>
      <description>&lt;P&gt;You can connect your tOracle(or other DB)Input component to a tSetGlobalVar to get the result into a new global variable.&lt;/P&gt;&lt;P&gt;Then, or you use a tOracleRow and you introduce the query by yourself (using the preceding global variable).&lt;/P&gt;&lt;P&gt;You map also use a standard tOracleOutput component for which the desired field will be populated with the global variable content (probably in a tMap or tJavaRow).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank's to mark your case as solved and open a new one for new or derived questions.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 09:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-java-var-on-SQL-query/m-p/2354684#M120598</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-02-12T09:30:14Z</dc:date>
    </item>
  </channel>
</rss>

