title: Error 1064 - Optionally Enclosed By ' " '
body: <p>After posting my question on the Error 1406 which I was getting when loading data into my MySQL db from a file (<a href="https://stackoverflow.com/questions/15505699/mysql-error-1406">mysql error 1406</a>) I saw that I was saving my raw data spreadsheet as a comma seperated file rather than a tab seperated file. I have now corrected this.</p>
  
  <p>Tom had made the point in his reply to the previous question that, as there are carriage returns in some entries in the data, I would need to enclose them with inverted commas, " ". In the spreadsheet I created a new column &amp; used the formula =CHAR(34)&amp;A1&amp;CHAR(34) to surround the cell text with "   ", formatted it so it keeps its text &amp; removed the original column. Checked it with a text editor &amp; all looks good to go.</p>
  
  <p>When I use the command:</p>
  
  <pre><code>mysql&gt; load data infile 'docs.txt'into table list fields terminated by '\t' lines
  terminated by '\n' optionally enclosed by '"' (vendor, title, id, part, project, 
  description, machine, shelf, compartment, name, checkout);
  </code></pre>
  
  <p>I get an error message of:</p>
  
  <pre><code>ERROR 1064 (42000): 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
  'optionally       enclosed by '"' (vendor, title, id, part, project, description,
  machi' at line 1
  </code></pre>
  
  <p>Can anyone help please. 
  **Just to say thanks for the assistance received in other questions so far. Im very impressed with the speed &amp; helpfullness of the responses on this forum</p>