Data Truncation error.

i trying to

import a text file to a table

which has the following fields

transid int

transitem tinyint

value money

starttime datetime

info nvarchar(128)

On my text file,

i put column 0 as numeric

col 1 as four-byte unsigned integer [DT_UI4]

col 2 as currency [DT_CY]

col 3 as database timestamp [DT_DBTIMESTAMP]

col 4 as Unicode string [DT_WSTR]

then it give me

Warning 1 Validation warning. Data Flow Task: Destination - TransItem [25]: Truncation may occur due to inserting data from data flow column "Info" with a length of 128 to database column "Column 4" with a length of 50. Package3.dtsx 0 0

anyone can help



Answer this question

Data Truncation error.

  • JRC

    on the metadata of your flat file connection source, your [DT_WSTR] has a default value of 50, change this to 128 or higher to prevent truncation of data
    Kervy

  • EricLaw-MSFT

    hehe...thanks for helping....


  • Data Truncation error.