Lola

>I keep getting an error message:

>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 'standardwttype.txt`

Use single quotes not (dreaded) backticks.

PB

-----

Lola J. Lee Beno wrote:
I'm trying to import a set of data into a database (MySQL 5.0.17-max). Here's the query that I tried to run:

LOAD DATA INFILE `standardwttype.txt`
INTO TABLE StandardWeightType
FIELDS TERMINATED BY `\t`
LINES TERMINATED BY `\r`
(standard_wt_type_id, standard_wt_desc, standard_wt_lud);

And here's a sample of the data that I'm trying to load:

1    Cobweb    2005-01-13 15:21:50.654149
2    Lace Weight    2005-01-13 15:21:50.654149
3    Sock    2005-01-13 15:21:50.654149
4    Fingering    2005-01-13 15:21:50.654149
5    Baby    2005-01-13 15:21:50.654149


There is a tab between each field, and each line terminates with \r, I believe (I use OSX).

I keep getting an error message:

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 'standardwttype.txt`


I've tried running just the first two line of the query and gotten an error message. I checked the online manual to make sure my syntax is correct, and checked "The Definitive Guide to MySQL 5".

How do I make this work?



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to