4 messages in com.mysql.lists.mysqlload data infile question
FromSent OnAttachments
Stan Anderton04 Aug 1999 08:34 
Stan Anderton04 Aug 1999 08:54 
Ralph Graulich04 Aug 1999 13:34 
Deniz Demir04 Aug 1999 23:43 
Subject:load data infile question
From:Stan Anderton (crea@ior.com)
Date:08/04/1999 08:34:57 AM
List:com.mysql.lists.mysql

Greetings!

I am having syntax difficulty with importing data into my database. I am hoping someone can point out my error.

The command:

mysql> load data infile '/home/mydir/Data.txt' into table Data ->fields terminated by ';' ->fields optionally enclosed by ";

When I give the command as above, I get another -> line instead of completion. If I use '"' I get a parse error.

What should I use. In the docs I see both of the above used in the examples. If I don't use any 'fields optionally enclosed by' at all, then my varchar fields are imported with quotes around them which messes up my queries.

Suggestions please,