SSIS Truncate Warning when moving data from a string max length 50 to a string max length 20

19,732

Solution 1

Your conversion should result in a NEW variable, do not use Phone1. Use the name of the Converted value.

Solution 2

Root cause - This warning message appears over the SSIS data flow task when the datatype length of the source column is more than the datatype length of the destination column.

Resolution - In order to remove this warning message from SSIS solution, make sure datatype length of the source column should be equal to the datatype length of the destination column.

Solution 3

Warning: Truncation may occur due to inserting data from data flow column "Phone1" with a length of 50 to database column "Telephone" with a length of 20.

Solution :

To remove the warning mentioned above, you may follow the below steps:

1)Right click on source components (for ex: flat file) and click on show advance editor.

enter image description here

2)Go to input and output properties.

3)Click on flat file source Output -->Output column --> select (PhoneNo)

4)You may get the properties window for phoneno click on Length property and change the value to 20. Click to Ok.

enter image description here

I wish this may help you.

Share:
19,732
theUnderdog
Author by

theUnderdog

Updated on June 18, 2022

Comments

  • theUnderdog
    theUnderdog almost 2 years

    Noob SSIS question please. I am working on a simple database conversion script. The original data source have the phone number saved as a string with len = 50 in a column called Phone1. The destination table has the telephone number saved as a string with len = 20 in a column called Telephone. I keep getting this warning:

    [110]] Warning: Truncation may occur due to inserting data from data flow column "Phone1" with a length of 50 to database column "Telephone" with a length of 20.

    I have tried a few things including adding a Derived Column task to Cast the Phone1 into a DT_WSTR string with length = 20 - (DT_WSTR, 20) (SubString(Phone1, 1, 20)) and adding a DataConversion tasks to convert the field Phone1 from WT_WSTR(50) into WT_WSTR(20) but none of them work. I know I can SubStr phone1 in the SQL String @ the OLEDB Source but I would love to find out how SSIS deals with this scenario

  • theUnderdog
    theUnderdog over 10 years
    yup that worked for me. Silly me I thought I have selected the converted.value
  • Binoy
    Binoy about 5 years
    upvoted as this helped me to sort out output column length issue. Super!