0

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.

Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
viraz
  • 45
  • 1
  • 2
  • 9
  • 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`. – David Benham Feb 07 '12 at 15:26
  • Thanks for the reply David, I am padding the values so the output is of same size which I want but I am still getting that error. – viraz Feb 08 '12 at 11:15
  • 1
    @DavidBenham thanks, substring helped me. – viraz Feb 11 '12 at 03:28
  • No problem. I'm going to reply with an answer, and I would appreciate it if you marked it correct. – David Benham Feb 11 '12 at 16:20

2 Answers2

4

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.

David Benham
  • 1,164
  • 11
  • 17
0

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.