Categories: String


Trims leading and trailing characters from a string.


BTRIM(expression STRING, trim_text STRING) → STRING

  • expression: String expression to be trimmed
  • trim_text: Leading and trailing chracters to trim from the input expression. If this parameter is not specified, then the spaces will be trimmed from the input expression.


SELECT BTRIM('      dremio ')
-- dremio
SELECT BTRIM('~/~/~/dremio~', '~')
-- /~/~/dremio
SELECT BTRIM('---dremio-', '-')
-- dremio
SELECT BTRIM('stringvalue', 'string')
-- value