Conversion of SSIS data from varchar to int

0

I'm stuck on a SSIS conversion, scenario:

I have a CSV file, which I need to import into a table already created in the database, In this database table I have an already populated column that receives data type INT, I noticed that there are records with up to 9 characters in this column.

I am trying to convert the data from this varchar CSV to integer, however, in the data type options provided by SSIS I have at most eight-byte, which is returning me the error

[Data Conversion [55]] Error: Data conversion failed while converting column "CONTA" (10) to column "Copy of CONTA" (72).
The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data."”.

Can someone help me or give me an alternative?

    
asked by anonymous 07.03.2017 / 22:31

1 answer

0

Right click on the task that searches the CSV data and opens the Advanced Editor, then go to the Input and Output Properties tab> Source > Output Columns > click on the field you want to change the type > In the DataType option you change from what is for NUMERIC [DT_NUMERIC]

    
04.04.2017 / 20:03