Excel file (percent data type) to SQL table (vafrchar16) error

  • Tried to load excel file to sql table

    dataflow task is failing because of data truncation error, in my source excel file it is % data type actual values are "2.35%"

    in my sql table it is varchar(16) but it is failing with eerrror "Data truncation" it seems larger than 16 characters any idea how can I solve it? please advise

    I am trying with derived column but failing the task

    Thank you in advance
    haniD

  • Hopefully this will give you more insight, when you import data in to SSIS, it will the data type to a relevant type in SSIS, this is done by sampling the data.

    1. In your Excel Data Source, right click and select show advanced editor.
    2. Change the tab to Input and Output Properties
    3. Expand Excel Source Output
    External Columns will show the data type picked up from excel
    Output Columns will show the new data type SSIS has chosen

    What I would also suggest checking is that in Excel that isn't a value out of range in that column, if the excel file contains multiple rows try using a cut down version of it first, maybe with 10 rows.

    Is it possible you could also change the format in excel to just a number, should be an easy import that way.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply