如何在phpmyadmin中将定界数据导入mysql [英] how to import delimited data into mysql in phpmyadmin

查看:63
本文介绍了如何在phpmyadmin中将定界数据导入mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我正在处理的数据的示例

This is a sample of the data im working with

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

如您所见,它的双管道定界了. phpmyadmin向我询问以下内容

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?

推荐答案

mysqlimport与--fields-terminated-by ="||"

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

Fields Terminated By ||

类似PHPMyAdmin.然后,您必须执行替换操作,但要注意不要弄乱数据(即,如果将||替换为,请确保原始字符中没有更多的字符)

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)

这篇关于如何在phpmyadmin中将定界数据导入mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆