Posted on: 05/21/11 12:48pm
By: Anonymous (DMurphy)
I am trying to import data that is tab delimited. The error message I receive is:
#1064 - 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 'john smith 123 main your town ca 94566 ' at line 1
The data between the ' ' is artificial for this example due to the sensitivity of the original data. Each item here represents a column of data " int, text and varchar" and so forth. My question is do I need to construct my data differently, another type of separation for mySQL to understand it properly? (I.E. comma or so forth).
I am using:
MySQL
Server: Localhost via UNIX socket
Server version: 5.1.44
Protocol version: 10
User: root@localhost
MySQL charset: UTF-8 Unicode (utf8)
Web server
Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1
MySQL client version: 5.1.44
PHP extension: mysql
phpMyAdmin
Version information: 3.2.4
Documentation
Wiki
Official Homepage
[ChangeLog] [Subversion] [Lists]
Re: #1064 - You have an error in your SQL syntax
Posted on: 05/22/11 08:01am
By: Roccivic
How are you importing this data? Through phpMyAdmin or at the MySQL console?
Do you have any quotes in your data: single quotes, double quotes, backticks?
Error 1064 generally means that you used some reserved word that you aren't meant to, but since you have posted some random data and no SQL statement to go with it, I can't tell for sure. Full list of reserved words here: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
Rouslan