What is the equivalent of "%[^ ]%" to Teradata?

106 views Asked by At
if @gl_cst_ctr_cde not like "%[^ ]%" 

Above is a Sybase code and would like to know the Teradata equivalent of not like "%[^ ]%".

1

There are 1 answers

2
dnoeth On BEST ANSWER

"%[^ ]%" searches for any character other than a space.

So not like "%[^ ]%" checks if there are only spaces (or it's an empty string)

In TD14 you could use a Regular Expression (REGEXP_SIMILAR) for LIKEs with character ranges, but in this case it should be exactly the same as a simple @gl_cst_ctr_cde = ''