%TrimSubstr meta-SQL element
Syntax
%TrimSubstr
(
source_str
,
start
,
length
)
Description
%TrimSubstr, like %Substring, expands to a substring of source_str, except that trailing blanks are removed from the substring.
Note:
If you trim a string of blanks, an empty
string is returned on all database platforms except Oracle, when a Null is returned. If
a Null result is not acceptable, such as when using the result as a value to insert into
a non-nullable column, you can turn the Null into a single blank using the %COALESCE
meta-SQL with %TrimSubstr, for example: %COALESCE( %TrimSubstr( <expression>), '
')
Related Topics