RTRIM

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Removes specified characters from the end of a string.

Syntax 

1rtrim(<string> [, characters])

Arguments 

Required 

  • <string>: The string to trim.

Optional 

  • characters: The characters to remove. Defaults to space.

Returns 

Returns a text value with specified characters removed from the end.

Considerations 

  • Removes individual characters from the set, not as a substring pattern.
  • Continues removing until encountering a character not in the set.

Examples 

Right Trim 

Remove characters from the end.

1SELECT rtrim('testxxzx', 'xyz') AS result;

Returns 'test'.

Related Documentation 

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!