I have input data which is being read as varchar and it has to b parsed out to get the zipcode.
We have a requirement which asks to check for strings in this field(zipcode).
How do I achieve this in the transformer?
Function to check for strings
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Umm... I think your terminology lacks a little something.
Do you mean "check for non-numeric characters" or "check for alphabetic characters" or some such?
The Num() function will check whether it's purely numeric, or you could use IsValid() to check whether it's an integer. Another more general approach is to use Convert() functions to eliminate all unwanted characters and compare that result to the original.
Do you mean "check for non-numeric characters" or "check for alphabetic characters" or some such?
The Num() function will check whether it's purely numeric, or you could use IsValid() to check whether it's an integer. Another more general approach is to use Convert() functions to eliminate all unwanted characters and compare that result to the original.
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.