Categories:

String & Binary Functions (General)

RTRIMMED_LENGTH

Returns the length of its argument, minus trailing whitespace, but including leading whitespace.

Syntax

RTRIMMED_LENGTH( <string_expr> )

Usage Notes

  • Equivalent to {fn LENGTH(str)} in ODBC.

  • Not equivalent to LENGTH in Snowflake.

Examples

SELECT RTRIMMED_LENGTH(' ABCD ');

+---------------------------+
| RTRIMMED_LENGTH(' ABCD ') |
|---------------------------|
|                         5 |
+---------------------------+