<?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: Appending Tables: One Issue in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339308#M107465</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;if you can get the *value* you have to put it on globalMap with the following code :&amp;nbsp; globalMap.put("myValue", *value*)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then in your sql code you can write this :&amp;nbsp; "select * from table where column = ' "+(String)globalMap.get("myValue")+" ' "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;SGV&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2017 15:39:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-11T15:39:32Z</dc:date>
    <item>
      <title>Appending Tables: One Issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339306#M107463</link>
      <description>&lt;P&gt;Hello. Here is what I want to do:&lt;/P&gt; 
&lt;P&gt;1. During runtime, use SQL to get a *value* (date) from the target table (such as the last update date).&lt;/P&gt; 
&lt;P&gt;2. Use the&amp;nbsp;&lt;SPAN&gt;*value* in a SQL WHERE&amp;nbsp;clause to pull just the needed subset of data from the source table.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;3. Append the subset of source data to the target table.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;The problem I am having is injecting the *value* into the SQL WHERE clause. I can get the *value* through a lookup (tMSSqlInput), but I do not know how to pass that value into the SQL code.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Example code.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;SELECT&lt;BR /&gt;ID,&lt;BR /&gt;Name,&lt;BR /&gt;Address1,&lt;BR /&gt;Address2,&lt;BR /&gt;City,&lt;BR /&gt;Zip,&lt;BR /&gt;UpdateDate&lt;BR /&gt;FROM dbo.DatabaseSource.Table&lt;BR /&gt;WHERE UpdateDate &amp;gt; passedIn*Value*&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Thanks for any help!&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Alllen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339306#M107463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T15:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Tables: One Issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339307#M107464</link>
      <description>&lt;P&gt;Store the value into a global variable (as the result of a tMSSQLInput for example) the reuse the variable to construct the select like this:&lt;/P&gt; 
&lt;PRE&gt;"SELECT
ID,
Name,
Address1,
Address2,
City,
Zip,
UpdateDate
FROM dbo.DatabaseSource.Table
WHERE UpdateDate &amp;gt; '" + (String)globalMap.get("yourVariableHere") + "'"&lt;/PRE&gt; 
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339307#M107464</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-09-11T15:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Tables: One Issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339308#M107465</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;if you can get the *value* you have to put it on globalMap with the following code :&amp;nbsp; globalMap.put("myValue", *value*)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then in your sql code you can write this :&amp;nbsp; "select * from table where column = ' "+(String)globalMap.get("myValue")+" ' "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;SGV&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:39:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339308#M107465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T15:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Tables: One Issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339309#M107466</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="myTalendGetDateVariable.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2RJ.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152013i1F8A5D1AC493A8B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2RJ.jpg" alt="0683p000009M2RJ.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Hi Everybody,&lt;/P&gt; 
&lt;P&gt;I'm very new to TOS and I have almost a similar situation in MS SQL where i'm suppose to insert latest records to a table AC. So I'm trying to get max Date from AC to know which records to fetch from another SQL DB. For this as per above diagram i have started with a tMSSQLinput_1 component with above mention query then i want to store the result set of&amp;nbsp;&amp;nbsp;tMSSQLinput_1 to tSetGlobalVar_2 (not sure if this is the best approach). As you can see i have added a Key and just to test if the results are stored i have used tLogRow_1 Component. but i am getting this error&lt;/P&gt; 
&lt;P&gt;"Execution failed : object is not an instance of declaring class&lt;BR /&gt;Job AgentCubeNew ended at 20:59 06/03/2019. [exit code=0]&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I would like to know is this the right approach?, also where should i write globalMap.put("myValue",*value*) to set the value in my variable from the query ?&lt;/P&gt; 
&lt;P&gt;Once i'm able to set the variable i would like to call it in another MSSQLinput component to get records from another db table which &amp;gt; maxdate of table AC&lt;BR /&gt;&lt;BR /&gt;Please guide&lt;BR /&gt;"&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 18:16:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Appending-Tables-One-Issue/m-p/2339309#M107466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-06T18:16:11Z</dc:date>
    </item>
  </channel>
</rss>

