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

more ▼

asked Jul 19, 2011 at 03:12 AM in Default

avatar image

2.8k 56 65 71

What code are you using to get this output?

Jul 19, 2011 at 03:34 AM Mrs_Fatherjack

I am trying to get this done using expressions in DataConversionTransformation .

Jul 19, 2011 at 03:57 AM aRookieBIdev
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

In my experience when I have needed to convert a value like 1200080 to 12000.80 I simply multiply by .01

more ▼

answered Jul 19, 2011 at 04:38 AM

avatar image

40.9k 39 94 168

yes , thats how i have done it now.Was just curious to see if there is a proper way to type cast it.

Jul 19, 2011 at 05:16 AM aRookieBIdev

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.

Jul 19, 2011 at 05:37 AM Tim
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Jul 19, 2011 at 03:12 AM

Seen: 2266 times

Last Updated: Jul 19, 2011 at 03:12 AM

Copyright 2018 Redgate Software. Privacy Policy