question

aRookieBIdev avatar image
aRookieBIdev asked

SSIS Data type conversion

Hi All, I am trying to convert a string datatype to decimal data type using a Data Conversion Transformation. My input is 1200080 my desired output is 12000.80 But what i get is 1200080.00 How do i include last two chars in the string as decimal. Thanks, Nk
ssisdatadatatypescast-convert
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

What code are you using to get this output?
0 Likes 0 ·
I am trying to get this done using expressions in DataConversionTransformation .
0 Likes 0 ·

1 Answer

·
Tim avatar image
Tim answered
In my experience when I have needed to convert a value like 1200080 to 12000.80 I simply multiply by .01
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yes , thats how i have done it now.Was just curious to see if there is a proper way to type cast it.
0 Likes 0 ·
I have yet to encounter one, every time I have tried converting to decimal with adding decimal places it just adds a period and however many zeros I specify to have decimal places.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.