trim

Returns "string_expression" trimmed of leading and trailing blanks or trimmed of a certain character specified in "match_character_expression". "Both" is implicit when the first argument is not stated and blank is implicit when the second argument is not stated.

Syntax

trim ( [ [ trailing|leading|both ] [ match_character_expression ] , ] 
string_expression )

Example 1

trim ( trailing 'A' , 'ABCDEFA' )

Result

ABCDEF

Example 2

trim ( both , ' ABCDEF ' )

Result

ABCDEF