<?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: mysql syntax error for a basic operation in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347046#M114366</link>
    <description>&lt;P&gt;I think you may have a couple of issues here. Have you selected "insert or update" for a reason in the component settings? If so, have you configured the "field options" in the advanced settings? You need to specify update keys and whether fields can be inserted and/or updated. Also your input component looks like the schema may not be aligned with your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, editing out information is not really necessary when it comes to database queries and error messages unless you are dealing with top secret data. In which case it makes sense to replace it with something different to protect your client rather than making it unreadable for anyone trying to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2018 14:37:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-04T14:37:36Z</dc:date>
    <item>
      <title>mysql syntax error for a basic operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347043#M114363</link>
      <description>&lt;P&gt;I have two jobs which are almost identical:&lt;/P&gt; 
&lt;P&gt;1 fetch data from source DB. Source DB 1 and DB 2 have the same collation UTF8 etc, so there shouldn't be any differences.&lt;/P&gt; 
&lt;P&gt;2 trim a source column data with FTRIM()&lt;/P&gt; 
&lt;P&gt;3 update or instert into target DB by Talend key. So Action on Data is "Update or insert".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For job 1, it's working as expected.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For job 2, am getting strange MySQL syntax error after tMap -&amp;gt; mysqlOutput and inserting:&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `name` = '&amp;lt;company name&amp;gt;' "&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I don't understand why Job1 works but Job2 doesn't. Attached two screenshots: first having the working Job schema for the output before MysqlOutput, second having for Job2.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Anyone having any idea? The only suspicious data I can see is a string having&amp;nbsp;'Oü' in it but according to tests, it's not an issue..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 20:24:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347043#M114363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-03T20:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: mysql syntax error for a basic operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347044#M114364</link>
      <description>&lt;P&gt;Unfortunately you have not given enough information for me to help. Can you show the error (a screenshot) and show the configuration of your tMap and your database insert component (the one which fails)? The error that you have posted looks more like it is linked to a query component, so can you show the configuration of your query component as well?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 00:59:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347044#M114364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T00:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: mysql syntax error for a basic operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347045#M114365</link>
      <description>&lt;P&gt;okay here you go&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;source:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="insert-component.png" style="width: 860px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LtOQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136550i3B6A1D281808678B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LtOQ.png" alt="0683p000009LtOQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ERROR&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="job-error.png" style="width: 840px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LtSt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155164iBB15EB9FBA8C9663/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LtSt.png" alt="0683p000009LtSt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;TMAP:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tmap-config.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsxJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134356iCA0C530FF833C71E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsxJ.png" alt="0683p000009LsxJ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;INSERT COMPONENT&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="insert-component.png" style="width: 839px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LtT4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156105i8838082A3D2AE91C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LtT4.png" alt="0683p000009LtT4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 14:29:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347045#M114365</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T14:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: mysql syntax error for a basic operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347046#M114366</link>
      <description>&lt;P&gt;I think you may have a couple of issues here. Have you selected "insert or update" for a reason in the component settings? If so, have you configured the "field options" in the advanced settings? You need to specify update keys and whether fields can be inserted and/or updated. Also your input component looks like the schema may not be aligned with your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, editing out information is not really necessary when it comes to database queries and error messages unless you are dealing with top secret data. In which case it makes sense to replace it with something different to protect your client rather than making it unreadable for anyone trying to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 14:37:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347046#M114366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T14:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: mysql syntax error for a basic operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347047#M114367</link>
      <description>&lt;P&gt;- insert and update is for a reason. goal is to extract data from that one field in source DB (company name) and then update insert it to target DB Companies -table.&lt;/P&gt; 
&lt;P&gt;- key is configured to Company.name of target DB, as the update or insert must follow that company.name&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;- the input schema is more excessive than target, need only one field, but in other jobs I haven't seen it matter.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;As reference, I have 99,9 % similar job that works fine. Only difference is that the source DB is physically a different DB than here in this problem case.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 15:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347047#M114367</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T15:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: mysql syntax error for a basic operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347048#M114368</link>
      <description>&lt;P&gt;hmm I selected&amp;nbsp;name column as "key in update" in the Field options, now it seems to process without error!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So seems good.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;BUT, I checked the other 99,9% similar job and it DOESNT have Field options modified at all and it processes the similar task well. So there company.name DOESNT have "key in update" selected....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;=&amp;gt; I can't understand why this Job 2 (under discussion here) seemed to require this checkbox, while the job1 didnt. Any idea? They insert/update to SAME target DB..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 15:35:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347048#M114368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T15:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: mysql syntax error for a basic operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347049#M114369</link>
      <description>&lt;P&gt;What is the difference between the two jobs? This could be several things. It could be that the first job (that works) didn't need to update and was able to insert as the primary key on the table allowed it. It could be that it makes sense for you the first job to update using primary key. It could be a number of things. However it is not a good idea to update without using the field options. You need to specify how you want to update. Your 1st job (that works) is lucky to be working. That is how you need to be think about it.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 15:45:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mysql-syntax-error-for-a-basic-operation/m-p/2347049#M114369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T15:45:15Z</dc:date>
    </item>
  </channel>
</rss>

