Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Rounding Differences between TSQL Cast and Data Conversion component

$
0
0

This is using SSIS 2012.  We are using an Ole Db Connection manager using the Microsoft.ACE.OLEDB.12.0 provider.

I have an Access database (accdb). It has several columns that are coming into SSIS as real data types.  One column has a value of 68.8335558900872.

In the past we used the Data Conversion to convert from real to numeric 18, 6.  The result was 68.833555.  Rather than rounding on the last decimal place, it is returning the floor at six decimal places.

We have converted the process to load the data into a real data type column and then use a view to cast the value to a Decimal 18,6 (CAST (Col1 as Decimal(18,6))).  We then load the data into a decimal 18,6 column.  The result is 68.833556, which is the rounded version of the real value.

Personally I prefer the rounded version rather than the truncated version.

I am trying to explain to explain to the QA people why the revised process is producing different results and thus I want to know if these are known behaviors for TSQL Cast and the Data Conversion component.


Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>