简体   繁体   English

在mysql中加载数据infile错误

[英]load data infile in mysql error

hy id like to have some quesiton about the next lines . 我喜欢对接下来的几行有所疑问。 i want to read a delimited text wich is also have text qualifier 我想阅读带分隔符的文本,也有文本限定符

LOAD DATA INFILE 'D:/teszt2.txt' into table hamburger
    Fields terminated by ',' 
    Enclosed by '"'
    lines terminated by '\n'

and the file is loks like this 文件看起来像这样

"650000",",103","DS SMITH RECYCLING GMBH","83064 RAUBLING, KUFSTEINER STR. 27", “ 650000”,“,103”,“ DS SMITH RECYCLING GMBH”,“ 83064 RAUBLING,KUFSTEINER STR。27”,

and i made the colums and the table first and i wanted to read the whole big text into it. 我首先做了柱子和桌子,我想把整个大文本读进去。 all of the columns are varchar(45) type but i get an error : 所有列都是varchar(45)类型,但出现错误:

Error Code: 1366. Incorrect string value: '\xC1NIA S...' for column 'szallito_nev' at row 1 0.000 sec

best regards 最好的祝福

I see an unpaired double quote (") in column two. could be taking rest of line as string. 我在第二栏中看到一个不成对的双引号(“)。可能会将其余行作为字符串。

"650000",",103","DS SMITH RECYCLING GMBH","83064 RAUBLING, KUFSTEINER STR. 27",
         ^

Should be 应该

"650000","",103","DS SMITH RECYCLING GMBH","83064 RAUBLING, KUFSTEINER STR. 27",

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM