BTRIM

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Removes specified characters from both the start and end of a string.

Syntax 

1btrim(<string> [, characters])

Arguments 

Required 

  • <string>: The string to trim.

Optional 

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

Returns 

Returns a text string with specified characters removed from both ends.

Considerations 

  • Removes individual characters from the set, not the string as a pattern.
  • Continues removing until it encounters a character not in the set.

Examples 

Trim Characters 

Remove specified characters from both ends.

1SELECT btrim('xyxtrimyyx', 'xyz') AS result;

Returns 'trim'.

Related Documentation 

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