Text was truncated or one or more characters had n

2019-02-01 20:46发布

I'm trying to import a flat file into an oledb target sql server database.

here's the field that's giving me trouble:

enter image description here

here are the properties of that flat file connection, specifically the field:

enter image description here

here's the error message:

[Source - 18942979103_txt [424]] Error: Data conversion failed. The data conversion for column "recipient-name" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

What am I doing wrong?

8条回答
Explosion°爆炸
2楼-- · 2019-02-01 21:45

SQl Management Studio data import looks at the first few rows to determine source data specs..

shift your records around so that the longest text is at top.

查看更多
做个烂人
3楼-- · 2019-02-01 21:53

While an approach proposed above (@chookoos, here in this q&a convert to Excel workbook) and import resolves those kinds of issues, this solution this solution in another q&a is excellent because you can stay with your csv or tsv or txt file, and perfom the necessary fine tuning without creating a Microsoft product related solution enter image description here enter image description here

查看更多
登录 后发表回答