Page 1 of 1

Logic Help

Posted: Thu Feb 07, 2013 5:05 pm
by phanikumar
Hi,

I am trying to find a solution to implement the following logic in Datastage

regexp_like(upper(POSTAL_CODE), '^S[0-9][0-9][0-9]$')

from the above line I can find the starting value of column, but how can I find the end value in a column.

Any suggestions would be greatly helpful.

Thanks

Kumar

Posted: Thu Feb 07, 2013 6:29 pm
by ray.wurlod

Code: Select all

(Len(InLink.String) = 4) And (Left(InLInk.String,1) = "S") And IsValid("integer",Right(InLink.String,3))
Or, if (when) you have the Data Rules stage (version 8.7 or later) you can test using a direct matches_regex rule.