Page 1 of 1

Converting string to decimal

Posted: Thu Jul 15, 2004 7:12 am
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?

Posted: Fri Jul 16, 2004 3:58 am
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?