title: Using "LOAD DATA LOCAL INFILE" in Java
body: <p>I have a cvs file which schema is, every field is surrounded with ", and seperated by , and every tuple is a newline with \n</p>
  
  <p>So in my Java file, I wrote </p>
  
  <pre><code>                String path = "o.csv";
                  String esquel = " LOAD DATA LOCAL INFILE " + path +
                              " INTO TABLE recommendations " +
                              " FIELDS TERMINATED BY \',\' ENCLOSED BY \'\"'" +
                              " LINES TERMINATED BY \'\\n\'";
  </code></pre>
  
  <p>And I execute the statement with the following statement</p>
  
  <pre><code>statement.executeUpdate(esquel);
  </code></pre>
  
  <p>But it throws an SQLException which says:</p>
  
  <blockquote>
    <p>com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'o.csv INTO
    TABLE recommendations  FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES'
    at line 1</p>
  </blockquote>
  
  <p>What is my error ? </p>
  
  <p>I would be appreciate if you can help me.</p>
  
  <p>Thanks</p>