简体   繁体   中英

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",

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 :

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",

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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