I've a dataflow in SSIS 2008. It reads the data from flat file and inserts in to database.

The flat file is CSV. For some reason, all the fields in flat file connection manager seems to have 50 OutPutColumnWidth.

Could someone please suggest how to fix it. I'm getting error below: Truncation may occur due to inserting data from data flow column


6 Answers 6


This is just a warning. Your package will execute anyway. This comes up because the length of source variable and the destination variable is not same.

To resolve this warning:

  • Right click the destination source,
  • Select show advance editor option,
  • Select the input and output properties tab
  • Expand the input and output variable and check the length.

If they are different then make it same using the data conversion operation.


Sounds like you have data in one of your columns that is longer than 50 characters. The default behavior of SSIS is to assign 50 to the width of the columns in an flat file source. You have to edit this manually or you could use the Suggest Types button to have SSIS sample your data and suggest appropriate data types.

Your error message should indicate which column is the issue. I would bump that width up in the connection manager definition to a larger variable and retry executing it. If you don't know what column it is, try using the Suggest Types button to have SSIS adjust its data types and lengths based on your data.


This warning message displays when any time source column data type length will be more than then length of destination datatype. To resolve the warning message check here -

  • Welcome in 2014 :). It does not only happen to time source columns. It can happen to any column that is being cast within SQL. Also, one should not link to another website like this if the website shows the main fix and the website could be lost over time. Commented Apr 16 at 10:33

If all else fails try this.

What I've experienced is that this error shows up occasionally after I've copied and pasted existing Ole DB Destination/Source element either from the same Data Flow Task or a Data Flow Task from another package and then start changing the details within.

Even when the Data Type and Length of the columns identical, this warning still appears on occasion. This is when I delete the copied element(s) and build them from scratch. This has made the warning disappear.

My guess is that the metadata is fouled up during the copy/paste.


I solved the truncation fiasco by Casting every output field first in my stored procedure, then continue with my code. This way I have full control and know my lengths. Then I can match them in my SSIS references.

IF 1 = 0
SELECT  CAST(NULL AS varchar(50)) AS InsurancePlan,
        CAST(NULL AS varchar(50)) AS PolicyNumber,
        CAST(NULL AS date)        AS ServiceDate
SELECT .....
  • I do not know whether this works in a Stored Procedure, but if you cast in the select query of the Data Source that feeds the Data Destination in SSIS, casting does not fix it. Commented Apr 16 at 10:45

The other answer in screenshots:

enter image description here

enter image description here

Input columns have it right:

enter image description here

External columns have it wrong:

enter image description here

You do not get around converting such columns in SSIS, casting them in SQL will not drop the warning:

enter image description here

No warning anymore:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.