Converting string to decimal
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 82
- Joined: Wed Jul 14, 2004 7:21 am
- Location: India
Converting string to decimal
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?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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?
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.