Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "Column 1" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

I have a a table which has a column:

material_desc nvarchar(255)

I am loading data using SSMS import from a csv file. While laolding a line:

Concentrate of Poppy Straw (Material Specification Name)

I get error:

Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "Column 1" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

I though this error was because 255 size  in nvarchar is 255, so I increased it to 1024, but I still got this error. I do not think error is because size of my column is small; it has to do something else.  I changes Specification Name to Sprec Name, then row was loaded.

I come from Oracle background. I fail to understand reasons for trunction; is there some option to be set, but import wizard does not provide any options.  Will appreciate your help.

September 3rd, 2015 11:12pm

Hi Prem,

Try this as well:

go to the properties of the source and select 'show advanced editor'.

go to tab 'input and output properties'

expand the tree node 'oledb souce output'

expand the child node 'output columns'

click on the specific column that gives you trouble.

when you click on the column, the properties of the column will be displayed on the right side. Go to property 'TruncationRowDisposition' and change the value to 'RD_IgnoreFailure'.

Please refer related thread;

https://social.msdn.microsoft.com/Forums/en-US/1291dbea-e64e-4492-aa75-bda7648cb82d/data-conversion-failed-the-data-conversion-for-column-value-returned-status-value-4-and-status?forum=sqlintegrationservices

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 11:24pm

I did this figure out. In Import there is an advnaced section where one can change the length from default value of 50 to a larger value which I did and I was able to load. Thanks.
September 4th, 2015 12:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics