Results 1 to 5 of 5
I've been trying to import data from a spreadsheet into mysql database,I have it in a cvs form with the right amount of fields as my database, but each time ...
- 08-20-2007 #1Linux Newbie
- Join Date
- May 2005
- Location
- Scranton, Pa
- Posts
- 166
Importing data in mysql?
I've been trying to import data from a spreadsheet into mysql database,I have it in a cvs form with the right amount of fields as my database, but each time I import into mysql I get an error message,
mysql> load data infile '/home/frank/OpenOffice_Backup/Cus.cvs' into table Custome rs;
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 '/home /frank/OpenOffice_Backup/Cus.cvs into table Customers' at line 1
mysql> load data infile '/home/frank/OpenOffice_Backup/Cus.cvs' into table Custo mers;
ERROR 13 (HY000): Can't get stat of '/home/frank/OpenOffice_Backup/Cus.cvs' (Err code: 2)
Any help appreciated. Thanks
- 08-21-2007 #2
As far as i know, this is not possible. The only way i think this may be possible would be through phpMyAdmin or something like this, but i think what you're best doing is passing it through sed to create the relevent insert statements to import this to SQL
"I am not an alcoholic, alcoholics go to meetings"
Registered Linux user = #372327
- 08-21-2007 #3Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
May this helps:
How do I import delimited data into MySQL?
Regards
- 08-22-2007 #4Linux Newbie
- Join Date
- May 2005
- Location
- Scranton, Pa
- Posts
- 166
Thanks for that tip, I'll try it and let you know how I made out.
Thanks for replies guys.
- 08-24-2007 #5


Reply With Quote
