`BTRIM`
Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API
markdownreferencev1RXN5-W83Qguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sql`BTRIM`Data 360Data CloudData 360 Query Guide
Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/btrim.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.
BTRIM
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Removes specified characters from both the start and end of a string.
<string>: The string to trim.
characters: The characters to remove. Defaults to the space character.
Returns a text string with specified characters removed from both ends.
- Removes individual characters from the set, not the string as a pattern.
- Continues removing until it encounters a character not in the set.
Remove specified characters from both ends.
Returns 'trim'.