|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
can somebody please tell me where I am going wrong here?
I'm trying to import a CSV file into a table, but everytime I do it it puts eveything into only 2 fields (in the first record) The command I'm using is... mysqlimport -d -h localhost -p -u root -v database ~home/table.csv fields-terminated-by=, a sample line from the csv would look like: field1,field2,field3 please help! |
|
#2
|
|||
|
|||
|
Check carriage returns at the end of line.
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by ThePrezLee: can somebody please tell me where I am going wrong here? I'm trying to import a CSV file into a table, but everytime I do it it puts eveything into only 2 fields (in the first record) The command I'm using is... mysqlimport -d -h localhost -p -u root -v database ~home/table.csv fields-terminated-by=, a sample line from the csv would look like: field1,field2,field3 please help![/quote] |
|
#3
|
|||
|
|||
|
Thanks, I actually solved this a few days after posting the message - a collegue wrote a program called "migrate" that does the job just fine
|
|
#4
|
|||
|
|||
|
Could you post the program to the board? (Provided it's a script and not compiled, of course!)
Chris |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Help with importing CSV |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|