TERADATA TRIM FUNCTION

Database
Enthusiast

TERADATA TRIM FUNCTION

I HAVE THE FOLLOWING TRIM FUNCTION WHICH IS PLACED IN THE WHERE CLAUSE. IT DOES NOT SEEM TO ACTUALLY DO THE TRIM. ANY IDEAS?

AND CHARACTERS (TRIM (BOTH '-' FROM TRIM (BOTH '''' FROM TRIM (BOTH '('
FROM TRIM (BOTH ')' FROM LST_NM))))) > 1

I ALSO TRIED THE FOLLOWING IN THE WHERE CLAUSE AND IT DOES NOT SEEM TO WORK EITHER:

AND CHARACTERS (TRIM (LEADING '-' FROM A.LST_NM)) > 1
AND CHARACTERS (TRIM (LEADING '(' FROM A.LST_NM)) > 1
AND CHARACTERS (TRIM (TRAILING ')' FROM A.LST_NM)) > 1

ANY HELP IS MUCH APPRECIATED.

REGARDS,
RICHARD
1 REPLY
Senior Apprentice

Re: TERADATA TRIM FUNCTION

Hi Richard,
put the function as a column into the select list to see the calculated data.

Btw, without any information about the actual data it's hard to know what's "not working".

Dieter