Is there a way to validate numeric digit-only string input in a parallel job transformer stage? Each character of the entire string must contain digits 0 through 9 only. Periods, negative signs, or any character outside of the 0..9 range needs to be invalid.
I have tried the Num() function and it fails on a decimal.
I have tried the IsValid("uint32", string) function and it also fails on a decimal such as 12.34.
I do not see any built in function to validate numeric digits only or to specify a range or list of characters that the string must match. Is there a built-in way to do this in a parallel job?
Thanks,
Eric
validate a char or varchar input string as numeric digits
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 5
- Joined: Thu Jul 29, 2004 1:28 pm
- Location: USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Convert("0123456789", "", InLink.TheString) > ""
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.
-
- Participant
- Posts: 14
- Joined: Thu Jul 10, 2008 7:37 am
- Location: mumbai
Hi Ray,
here it will convert any blank space in "0123456789" with the InLink.TheString and that with the single character which will be 1st character of InLink.TheString and then will be compared with "".
I did not get what your are trying to tell.
Can you please explain how the above code works as my understanding may wrong.
here it will convert any blank space in "0123456789" with the InLink.TheString and that with the single character which will be 1st character of InLink.TheString and then will be compared with "".
I did not get what your are trying to tell.
Can you please explain how the above code works as my understanding may wrong.