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

Converting float to int in SSIS serived column

$
0
0

In my data flow, I have several columns that I modify using a derived column. One column is a float, and the decimal portion is always 0. The portion to the left of the decimal has a variable number of digits. I would like to convert this to an 8-byte int using the derived column. Below are some example values for the column and an expression I have tried.

FLOAT: 0.000000                  INT: 0

FLOAT: 1234567.000000       INT: 1234567

FLOAT: 123456789.000000   INT: 123456789

(DT_I8) FLOOR(col1)

Apparently, just casting a float as an int won't convert it to an int in the derived column, but it also doesn't cause an error. It just leaves it as a float. Can anyone help me figure out how to do this conversion? Thanks in advance!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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