Converting string to decimal

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinodlakshmanan
Participant
Posts: 82
Joined: Wed Jul 14, 2004 7:21 am
Location: India

Converting string to decimal

Post by vinodlakshmanan »

I have to convert a varchar(15) value to decimal (10, 10) value. If I us StringToDecimal function the job aborts. Can someone elaborate why this happens and how to use the StringToDecimal function so that I get the input string without truncation, rounding, flooring or ceiling in the output?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Abort is fairly serious - is there some value in the input data that is not valid to be converted to DECIMAL(10,10)?
This data type implies that your data values, when converted, will be between 0 and 1. Is this correct for all values? Is the decimal place character present in the VARCHAR field, or is it supposed?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply