REG_EXP expressions help need

Teradata Applications
New Member

REG_EXP expressions help need

Hi Team,


I have the below scenario


1. if the columnA has data like 'abcde' or 'bcdef' like this sequential order the total field should be replaced with NULL (e.g. 55555 or 123456789012 to NULL).


abcderajesh --> NULL

abcrajesh --> abcrajesh

123456 -> NULL

123Rajesh --> 123Rajesh


Could you please help me to attain the scenario using REG_EXP any functions


Thanks in Advance

Rajesh B

Senior Supporter

Re: REG_EXP expressions help need

I am not sure that I get your full requirement...


if you have a lists of patterns to check for you could use like any


case when columnA like any ('%abcde%,'%bcdef%,%12345%) then null else columnA

if you are looking for any kind of increasing pattern with variable length it will be more difficult - first question is which is the space of letters and second what is the order function (eg. is 1 > a  for example)...