---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/btrim.md
cuppy_section: docs
cuppy_doc: RXN5-W83Q
cuppy_doc_uuid: d2ccc8f7-8ea1-4d7b-bd45-1cc08591337c
cuppy_permalink: https://cuppy.io/salesforce/d/RXN5-W83Q
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/btrim
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 9aedc8b533a337a594420efba7e7442d6a849d7a7350eb8f5c3f53c41cce456f
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> 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'`.

*   [String Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string.html)


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
