views:

427

answers:

2

This is a sample of the data im working with

24701||37.279788||-81.229023||WV||BLUEFIELD||MERCER

as you can see its double pipe delimited. phpmyadmin is asking me for the following

Fields Terminated By  
Fields Enclosed By    
Fields Escaped By  
Lines Terminated By

what do i put to correctly import my data?

+2  A: 

mysqlimport works with --fields-terminated-by="||"

Fields Terminated By ||

Looks like PHPMyAdmin doesn't. Then you have to do a replace, but be careful that you aren't messing with your data (ie, if you replace || for , be sure there are no further , characters in the original)

Vinko Vrsalovic
it errors: Invalid parameter for CSV import: Fields terminated by
Patrick
That looks like a bug in phpmyadmin... :/ mysqlimport, the commandline tool works perfectly using --fields-terminated-by="||"
Vinko Vrsalovic
A: 

Did a find/replace in notepad++ of || and replaced it with comma so the data read

24701,37.279788,-81.229023,WV,BLUEFIELD,MERCER

Then filled in the following:

Fields Terminated By ,
Fields Enclosed By 
Fields Escaped By \
Lines Terminated By auto

worked great

Patrick