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> ) 
Copy

Usage notes

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

  • Not equivalent to LENGTH, LEN in Snowflake.

Examples

SELECT RTRIMMED_LENGTH(' ABCD '); +---------------------------+ | RTRIMMED_LENGTH(' ABCD ') | |---------------------------| | 5 | +---------------------------+ 
Copy