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

  • What is the wish in the flat file ? You can change the width in ssis.
    – Kin Shah
    Jan 13 '14 at 14:02

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 -


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.


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 .....

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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