@Khurram:
AFAIK regular expressions in Teradata are based on the PCRE open source library:
http://en.wikipedia.org/wiki/PCRE
There are lots of books and online tutorials for regular expressions:
http://en.wikipedia.org/wiki/Regular_expression
I only know the very basic stuff, but REGEXP_SIMILAR(x, '[a-z]+', 'i') should return 0 when there's any special char.
@Rahul:
CASE
WHEN CHAR_LENGTH(oTranslate(your_column, 'abcdefghijklmnopqrstuvwxyz','') > 0
THEN NULL
ELSE your_column
END
should return NULL when there's any char outside of a to z.
But i wonder why you remove 'PAG', this seem sto be a valid string?
Dieter
@Khurram:
AFAIK regular expressions in Teradata are based on the PCRE open source library:
http://en.wikipedia.org/wiki/PCRE
There are lots of books and online tutorials for regular expressions:
http://en.wikipedia.org/wiki/Regular_expression
I only know the very basic stuff, but REGEXP_SIMILAR(x, '[a-z]+', 'i') should return 0 when there's any special char.
@Rahul:
should return NULL when there's any char outside of a to z.
But i wonder why you remove 'PAG', this seem sto be a valid string?
Dieter