今天用excel導(dǎo)入數(shù)據(jù)又遇到了……
錯(cuò)誤 0xc02020f6:數(shù)據(jù)流任務(wù):列“column”無法在 unicode和非unicode字符串?dāng)?shù)據(jù)類型之間轉(zhuǎn)換。
原因:仔細(xì)看了一下,發(fā)現(xiàn)有些字段是varchar的,而excel中估計(jì)都是nvarchar類型。
方法:
1.修改表字段類型為nvarchar。
2.導(dǎo)入一個(gè)臨時(shí)表,再insert*** into *** select ***。
3.直接通過應(yīng)用程序讀入記錄集,然后再一條一條insert into ……。
您可能感興趣的文章:- C#將Unicode編碼轉(zhuǎn)換為漢字字符串的簡(jiǎn)單方法
- python 轉(zhuǎn)換 Javascript %u 字符串為python unicode的代碼
- golang實(shí)現(xiàn)unicode轉(zhuǎn)換為字符串string的方法
- JavaScript中字符串與Unicode編碼互相轉(zhuǎn)換的實(shí)現(xiàn)方法
- JavaScript字符串對(duì)象fromCharCode方法入門實(shí)例(用于把Unicode值轉(zhuǎn)換為字符串)
- Java String字符串和Unicode字符相互轉(zhuǎn)換代碼
- JS 文字符串轉(zhuǎn)換unicode編碼函數(shù)
- asp實(shí)現(xiàn)二進(jìn)制字符串轉(zhuǎn)換為Unicode字符串
- js字符串與Unicode編碼互相轉(zhuǎn)換