0

I have a flat file with the below value:

AI9983|01|20170802|119965.57|0.000000|0.000000|||
AI9983|01|20170803|119713.62|-0.210019|-0.210019|||

I read the file, the value 119965.57 gets stored as 119965.60 the value 119713.62 gets stored as 119713.60.

When reading the flat-file the variable is set as float[DT_R4] It gets stored in the database as decimal(28,2).

Can someone help me to sort this out, I need to store the value as it is in the flat file into the database.

I am not using any derived column or transformation here.

Tomislav Stankovic
  • 3,080
  • 17
  • 35
  • 42

1 Answers1

0

Float will not return a reliable result, so it is challenging to use in database work.

In the flat file connection manager, go to the columns tab, select the column and change the data type to numeric with a DataPrecision of 28 and Scale of 6 (Based on the sample data provided in the question).

Mark Wojciechowicz
  • 4,287
  • 1
  • 17
  • 25