Page 1 of 1

Conversion - Varchar To Decimal

Posted: Wed Jun 03, 2015 11:14 pm
by Oritech
I am trying to convert in transformer

Varchar To Decimal 38 , 10

Incoming value is DU 2015F21

Tried StringToDecimal(Ln_name.Input) function

Its converting incoming value DU 2015F21 to 0

Pls advice .

Posted: Thu Jun 04, 2015 12:12 am
by priyadarshikunal
"DU 2015F21" does this value look like decimal. NO. So when converted to decimal default value is assigned.

If there is a conversion logic to convert this to a numeric value, you may want to implement the logic explicitly in the transformer stage and then map it to a decimal field.

Posted: Thu Jun 04, 2015 1:04 am
by ray.wurlod
You could use the IsValid() function to filter records in which the incoming value is convertible to Decimal data type. "DU 2015F21" is not one of this class. You need to design a strategy to capture and process invalid data, even if it's only to initiate remediation of source data.