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.
- 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”
- 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
- 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.
- Now run your package
Note: In my case column that’s caused this error is “RECIPIENT”
Hi,
Sometimes we have numerous columns in an input file and especially with date or datetime columns or any amount columns it gets difficult to id where the error is.
In that case i resort to 2-step staging as follows: Maintain all data types to be DT_STR in the package and nvarchar in the destination table.
After you’ve got the staging table with all data types as nvarchar then you can perform your checks for IsNumeric, etc to load into the next staging table with expected datatypes.
Also its easier to query the first staging table for any errors than the (text) file. This approach helps when you are in the initial stages of dealing with importing the particular file.