Text Was Truncated or One or More Characters Had No Match in the Target Code Page Including the Primary Key in an Unpivot

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

After failing by increasing the length or even changing to data type text, I solved this by 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.

SSIS Flat File error Text was truncated or one or more characters had no match in the target code page.

Check out this link:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/32129879-90e1-491e-8c80-f3c3cf6eb0e0/how-to-avoid-truncation-error-in-ssis-for-flat-file?forum=sqlintegrationservices

Two ways for addressing the problem are described.

SSIS - Text was truncated or one or more characters had no match in the target code page - Special Characters

If you go to the Flat file connection manager under Advanced and Look at the "OutputColumnWidth" description's ToolTip It will tell you that Composit characters may use more spaces. So the "é" in "Société" most likely occupies more than one character.

EDIT: Here's something about it: http://en.wikipedia.org/wiki/Precomposed_character

Text was truncated or one or more characters had no match in the target code page - from SQL Server

Resolved the issue by making it

Unicode string [DT_WSTR]

Text was truncated or one or more characters had no match in the target code page

I have use the SSIS for this task and its work. The fields with error are move to the flat file and other all fields are successfully moved to the database as I need.



I get the help from following link:


https://www.simple-talk.com/sql/ssis/moving-data-from-excel-to-sql-server-10-steps-to-follow/



Related Topics



Leave a reply



Submit