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

Can I convert number to string in SSIS data transformation?

$
0
0

I am an SSIS newbie and looking for some "best approach" guidance on this one. 

I am working on a data flow in which I have a string in this format:

000001026+

This string would represent $10.26.  It is a fixed width field with 9 numbers followed by a + or -. Somehow I have to account for whether it is a positive or negative number, as well as moving the decimal.  I have tried using a script component to convert this to an integer and had a very difficult time.  There certainly must be an easier way to do this.

Can this be accomplished with a derived column and a formula of some sort?  Or is this one of those cases where a script truly is better (and I just need to brush up on my C#)?  Somehow I need to get that string in a format I can use in mathematical calculations.

Any help would be greatly appreciated.  Many 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>