Hi everyone,
I need to convert a varchar into a numeric.
the varchar looks like this +xxxxx.xx , where x represents anumber.
for example, +00000.00, +00106.98, +00020.55
can anyone give me some ideas?
translate a string into a number
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Because there are no data types within DataStage (OK, that's a simplification, but it's how things seem), you can actually do nothing.
If the sign is going to cause a problem, simply perform some arithmetic. The most efficient is adding zero.
If the sign is going to cause a problem, simply perform some arithmetic. The most efficient is adding zero.
Code: Select all
InLink.TheVarChar + 0
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.