Page 1 of 1

Conversion from string to decimal

Posted: Tue Mar 10, 2009 6:17 am
by coolbin81
Hi all,

In one of my jobs, i am converting a field from string to decimal and then using this in the constraint. For eg: StringtoDecimal(Trim(Inputfield)) <> 0.0

I am getting the following warning message in the job:

Conversion error calling conversion routine decimal_from_string data may have been lost

Since there are multiple splits, i won't be able to determine if any records are getting dropped.

Can anyone help me out in resolving this issue and guide me what needs to be done to eliminate this warning?

Posted: Tue Mar 10, 2009 3:54 pm
by ray.wurlod
It's an alert, not a warning. When converting from string to decimal rounding may occur. Therefore "rounding errors" may occur. No records will be dropped, but some may incur these rounding issues. Then again, none may - depends on your data. But DataStage always generates the "precision may have been lost" alert message.

Posted: Thu Mar 12, 2009 12:06 am
by coolbin81
Thanks Ray.