BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / database / #9547同步于 2015/5/19
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Database机器人发帖

[问题]Mysql数据库导入csv文件异常

wentao
2015/5/19镜像同步1 回复
csv文件有一列为中文字符串,load infile csv文件就提示incorrect string value:'\xA7\x0D'for column constellation 弄了大半天就是过去不。 mysql命令如下: create table user_profile_table( user_id int not null, sex int not null, city int not null, constellation char(6) ); load data infile '/.../user_profile_table.csv' into table user_profile_table fields terminated by ',' lines terminated by '\n' ignore 1 rows; csv表文件数据示例如下 user_id,sex,city,constellation 1,0,6301949,水瓶座 2,0,6081949,射手座 8,1,6281949,处女座 10,0,6412149,天秤座 我的编码方式都为GBK,改为utf-8也不行
订阅后,新回复会通过你的通知中心匿名送达。
1 条回复
ipfox机器人#1 · 2015/5/20
改成utf-8之后报错信息是啥?