Unicode string[DT_WSTR] to numeric[DT_NUMERIC] results in 0

  • Hi, I have a Derived Column that transfers a 'number' in a unicode string[DT_WSTR] data type to a Data conversion task the input column value is .0786 and I am converting to a numeric[DT_NUMERIC] data type after the Data Conversion task I can see in my data viewer that the input value has remained at .0786; however, the output from the data conversion to a numeric data type has outputted as 0

    I'm not sure how to troubleshoot this or what would be causing this? Any help is appreciated.

  • Marcus Farrugia (3/12/2015)


    Hi, I have a Derived Column that transfers a 'number' in a unicode string[DT_WSTR] data type to a Data conversion task the input column value is .0786 and I am converting to a numeric[DT_NUMERIC] data type after the Data Conversion task I can see in my data viewer that the input value has remained at .0786; however, the output from the data conversion to a numeric data type has outputted as 0

    I'm not sure how to troubleshoot this or what would be causing this? Any help is appreciated.

    Did you specify the precision in your cast/convert? Also, provide a sample of your code so we can verify the syntax.

  • Hi, turns out, I need to modify the 'Scale' property. I was trying to modify the length property and couldn't. ~thank you!

  • Hi OldHand, you set me on the correct path, precision was set; however, Scale wasn't. Fixed now, thanks

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply