viraz
viraz

Reputation: 45

SSIS data conversion failed

I am getting this error when trying to execute the SSIS package.

[Flat File Destination [22]] Error: Data conversion failed. The data conversion for column "DC" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

The column is of size 10 and I want that to be 4 in output, I had that set in my flat file but is not working.

Please advise where I am going wrong.

Regards V.

Upvotes: 0

Views: 12885

Answers (2)

user3446081
user3446081

Reputation: 1

SSIS Error: Data conversion failed. The data conversion for column “”RECIPIENT”” returned status value 4 and status text “Text was truncated or one or more characters had no match in the target code page. Answer:- (1) Just Right Click on Connection string for your Flat file source and got advanced column and find "RECIPIENT" Column properties update Column size with actual size like from 50 to 100.

(2) Right Click on Flat File Source and choose “Show Advanced Editor” Go to “Input and Output Properties “ Tab Expand “Flat File Source Output” and choose “External Columns”

(3) Select column that is causing this error (In my case column is “RECIPIENT” as per above error message) and on right hand side, increase length say 100 or 200 or depending on your column length (4) Now select “Output Columns” and select same column as above and make this value same as we did in Step 4, in my case its 200 as shown below. (5) Run It works.

Upvotes: 0

David Benham
David Benham

Reputation: 1174

If you don't want to mess with the Flat File properties, you could trim the value in your data source. IE SELECT SUBSTRING(Column,1,4) AS Column FROM Table.

Upvotes: 4

Related Questions