List:General Discussion« Previous MessageNext Message »
From:Douglas Brantz Date:September 9 2000 3:44am
Subject:infile syntax question
View as plain text  
I am going to experiment with the input file function of Mysql tomorrow
morning.

I have spent an hour editing a 650 line excel file and saved it as tab
delimited.txt.
Then in word I converted the tabs to "," .

In some fields I have commas inside the quotes and I assume that this
will not mess things up?
Some fields are empty so I include them with ,"",
I don't have the \n ,which I will use to terminate the lines, in quotes
- is that correct?

Here is a sample :

"Douglas”,”Bond”,”password”,”1971”,”Rank”,”Street
Address”,"City",”NC”,”Zipcode”,”Phone”,"",”Teacher,  NC 28098”\n
"Tom”,”Knight”,”password”,”1971”,”Rank”,”Street
Address”,”City”,”NC”,”Zipcode”,"Phone",”",Senior Military Assistant, US
Army”\n

Here is how I plan to insert this data - please let me know if this is
incorrect.

Load Data Infile "data.txt" into table TableName
(firstname,lastname,password,year,rank,street,address,state,state,zip,phone,email,info_blob)FIELDS
TERMINATED by ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

Thanks in advance,

Douglas

Appalachian State University
Boone, NC 28607

Thread
infile syntax questionDouglas Brantz9 Sep
  • HELP!! LOAD infile syntax ERROR?Douglas Brantz9 Sep