title: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
body: <p>I am trying to send some data from Node JS to MySQL using "mysql" module downloaded from NPM.</p>
  
  <pre><code>connection.beginTransaction(function(err) {
          if (err) { throw err }
          connection.query(sq, function (error, result) {
                if (error) {
              //return connection.rollback(function() {
              throw err
            //})
            } else {
              console.log('data is inserted ... ' + new Date())
            }
          })
  </code></pre>
  
  <p><strong>My Query i.e. sq is some thing like that..</strong></p>
  
  <pre><code>INSERT INTO archlb_sales(fiscalYear, fiscalQuarterID, fiscalPeriodID, fiscalWeekID, geo, theater, area, operation, region, country, salesAgen
  tName, emailID, arch, technology, subTechnology, tms3, productFamily, scms, totalSales, agentType, salesAgentnumber, softBookingsNet) values ('
  2017', '2017Q1', '201701', '2017014', 'Americas', 'Americas-MISCL2', 'Americas-MISCL3', 'Americas-MISCL4', 'Americas-MISCL5', 'UNKNOWN', 'G2C A
  djustment Agent', 'UNKNOWN' , 'Collaboration' , 'Collaboration','CLOUD SW' , 'CLD-AUDIO-SW' , 'CWAU', 'OTHER' , -205, 'TEAM AGENT', 'UNKNOWN' ,
   '1') ON DUPLICATE KEY UPDATE totalSales = totalSales + -205;
  
  INSERT INTO archlb_sales(fiscalYear, fiscalQuarterID, fiscalPeriodID, fiscalWeekID, geo, theater, area, operation, region, country, sal
  esAgentName, emailID, arch, technology, subTechnology, tms3, productFamily, scms, totalSales, agentType, salesAgentnumber, softBookingsNet) val
  ues ('2017', '2017Q1', '201701', '2017014', 'Americas', 'Americas-MISCL2', 'Americas-MISCL3', 'Americas-MISCL4', 'Americas-MISCL5', 'UNKNOWN',
  'G2C Adjustment Agent', 'UNKNOWN' , 'Collaboration' , 'Collaboration','CLOUD SW' , 'CLD-AUDIO-SW' , 'CWAUCC', 'OTHER' , -123, 'TEAM AGENT', 'UN
  KNOWN' , '1') ON DUPLICATE KEY UPDATE totalSales = totalSales + -123;
  </code></pre>
  
  <p>The values of those variables are read from a text file, which are come correctly</p>
  
  <p>MySQL gives the following error.</p>
  
  <pre><code>Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ri
  ght syntax to use near \'INSERT INTO archlb_sales(fiscalYear, fiscalQuarterID, fiscalPeriodID, fiscalWeek\' at line 3
  </code></pre>
  
  <p>This is the table schema:</p>
  
  <p><img src="https://i.stack.imgur.com/gKbFU.jpg" alt="enter image description here"></p>