by Joshua Brauer on June 24, 2003
This is mainly a cheat sheet for me in recalling the best way to load MS Excel data into MySQL.
- Set dates to format YYYY-MM-DD
- Put columns in the same order as the database
- Save data as tab delimited
- Use BBedit (or another program) to convert line breaks to UNIX (^n)
- Put file in directory with no spaces in the path
- Launch MySQL
- Load data with command "load data infile '/PATH/FILE' into table `TABLE_NAME` LINES TERMINATED BY '\n';"
This is not comprehensive nor does it deal with all situations. Just a place holder for the information.