<?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 update with where clause. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237753#M26077</link>
    <description>Sorry, I don't explain me very good, this query was only a example, It is not important whether this correct or not.
&lt;BR /&gt;I see that mysqloutput have the option, in "Action on data" for Insert or Update. I want know if is possible use this component for an update query with a where clause or if I only can use the tmysqlrow component or if exist other component for update.</description>
    <pubDate>Fri, 23 Jan 2015 14:00:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-23T14:00:32Z</dc:date>
    <item>
      <title>How update with where clause.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237751#M26075</link>
      <description>Hi,
&lt;BR /&gt;I have a little problem, I need update a table with a where clause, but I don't know what the best component to make it.
&lt;BR /&gt;I have this query:
&lt;BR /&gt;UPDATE SGPE_RE_INSTALATION SET VALUE =AA
&lt;BR /&gt;, USER = 9999999998
&lt;BR /&gt;, ID_REGISTER =12345
&lt;BR /&gt;&amp;nbsp;WHERE ID =&amp;nbsp;&amp;nbsp; ABC
&lt;BR /&gt;I try with mysqlOutPut and mysqlRow, but I don't know how use the "where".
&lt;BR /&gt;Thank you.</description>
      <pubDate>Fri, 23 Jan 2015 13:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237751#M26075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-23T13:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: How update with where clause.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237752#M26076</link>
      <description>You should put the '' between your value.
&lt;BR /&gt;Try :&amp;nbsp;
&lt;BR /&gt;
&lt;PRE&gt;UPDATE SGPE_RE_INSTALATION SET VALUE ='AA'&lt;BR /&gt;, USER = '9999999998'&lt;BR /&gt;, ID_REGISTER ='12345'&lt;BR /&gt;&amp;nbsp;WHERE ID = &amp;nbsp; 'ABC'&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Jan 2015 13:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237752#M26076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-23T13:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: How update with where clause.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237753#M26077</link>
      <description>Sorry, I don't explain me very good, this query was only a example, It is not important whether this correct or not.
&lt;BR /&gt;I see that mysqloutput have the option, in "Action on data" for Insert or Update. I want know if is possible use this component for an update query with a where clause or if I only can use the tmysqlrow component or if exist other component for update.</description>
      <pubDate>Fri, 23 Jan 2015 14:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237753#M26077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-23T14:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: How update with where clause.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237754#M26078</link>
      <description>Oh, ok.
&lt;BR /&gt;Actually, I am using a UPDATE with a clause WHERE with the tMySQLRow.
&lt;BR /&gt;You can't configure the query with the tMysqlOutput.
&lt;BR /&gt;The query will be the "Action on data", and the flow that is coming to the component.</description>
      <pubDate>Fri, 23 Jan 2015 14:19:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237754#M26078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-23T14:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: How update with where clause.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237755#M26079</link>
      <description>Yes, the data will come from an 'input' component, and the output component will automatically do what you tell it via the 'insert or update' or whatever you tell it. 
&lt;BR /&gt;However, the question I think you are trying to ask is: How do I select all the data I will NEED to update (from the input component)? 
&lt;BR /&gt;You can do this via a simple where clause in your input component, though for this to work as I will say in a moment you will need both the input table and the ouput table on the same database, if this is not so I have an idea to help with that also but it is a little more difficult and complicated so I will not say now. 
&lt;BR /&gt;As for the sql query, here is my example using tables one and two with columns id, alpha, beta and delta: 
&lt;BR /&gt;select one.id 
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,one.alpha 
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,one.beta 
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,one.delta 
&lt;BR /&gt;from one,two 
&lt;BR /&gt;where one.id = two.id 
&lt;BR /&gt;and (two.alpha &amp;lt;&amp;gt; one.alpha 
&lt;BR /&gt;or two.beta &amp;lt;&amp;gt; one.beta 
&lt;BR /&gt;or two.delta &amp;lt;&amp;gt; one.delta) 
&lt;BR /&gt;; 
&lt;BR /&gt;This code would only select data needed to be updated, you would then pass this data into the output component with 'Update' selected and it would do its thing 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;I hope this helps.</description>
      <pubDate>Mon, 26 Jan 2015 14:05:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237755#M26079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-26T14:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: How update with where clause.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237756#M26080</link>
      <description>There's a much easier way to do what you want than what V Pem recommends.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;Set your db output components "Action on Data" to "Update"&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;On the Component-&amp;gt;Advanced Settings sub-tab check the "Use field options" checkbox. In the Field Options table, the "Update Key" columns will be used to locate the records to update. ( analogous to the WHERE clause of an update query) 
&lt;BR /&gt; 
&lt;BR /&gt;The "Updatable" checkbox will control which columns are applied ( like the SET clause )&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;Once these are set, Talend will generate update queries using the values inside the Talend Row. Let us know if you need any further assistance, we're always happy to help &amp;nbsp;:cool: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCc3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135135i417D99C4E89FC12A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCc3.png" alt="0683p000009MCc3.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 26 Jan 2015 20:32:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237756#M26080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-26T20:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How update with where clause.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237757#M26081</link>
      <description>Thank you very much&amp;nbsp; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;B&gt;JohnGarrettMartin &lt;/B&gt;for your explanation, I have used:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;B&gt;tBInput &lt;/B&gt;(from Sql Server, table1), &lt;B&gt;tMap &lt;/B&gt;and &lt;B&gt;tMySqlOutput &lt;/B&gt;(to MySql table2)&lt;B&gt;, &lt;/B&gt;and&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;mapped with&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;B&gt;&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tMap&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;field table1.from1 with&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;table2.to1,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;field table1.from2 with&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;table2.to2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;then, with&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;B&gt;&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tMySqlOutput&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;configured "Update" as "Action on Data"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;and&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;table2.to1&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;as "&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;"Update Key"&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;table2.to2 as "&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Updatable"&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;obtaining something like ....&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;update table2 set table2.to2 = table1.from2 where table2.to1 = table1.from1&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt;And WORKED!!!</description>
      <pubDate>Thu, 07 Apr 2016 11:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-update-with-where-clause/m-p/2237757#M26081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-07T11:24:47Z</dc:date>
    </item>
  </channel>
</rss>

