Page 1 of 1

Function to check for strings

Posted: Thu Sep 30, 2010 6:49 pm
by ppp
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?

Posted: Thu Sep 30, 2010 7:49 pm
by ray.wurlod
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.

Posted: Thu Sep 30, 2010 8:39 pm
by ppp
You are absolutely right. The Num() Function works perfect. Thank you