Skip to content
Advertisement

Text was truncated or one or more characters had no match in the target code page including the primary key in an unpivot

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?

Advertisement

Answer

I know this is an old question. The way I solved it – after failing by increasing the length or even changing to data type text – was creating an XLSX file and importing. It accurately detected the data type instead of setting all columns as varchar(50). Turns out nvarchar(255) for that column would have done it too.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement