> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# RTrim

> RTrim removes trailing spaces from the end of a string.

**RTrim** removes trailing spaces from the end of a string.

## Usage

```
RTrim(text)
```

**text** (required)- Text or a column of text to remove the trailing spaces from.

## Example

```
RTrim(" John Doe ")
```

* Returns `” John Doe”`
* Spaces on the left side are not removed

```
RTrim([First Name])
```

* Returns:

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/c60efd573c0febd7f7472ac9048d2057ffb143a5af538e6d353acf2ec17e9b8d/assets/docs-images/d161f2b-mceclip0_3.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T083138Z&X-Amz-Expires=604800&X-Amz-Signature=71e14bd8bbc96b7c5af4ed75cdb91e41be0e5722d4a2117d9388f5b09604d6ec&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Related resources

* [LTrim](/docs/ltrim)
* [Trim](/docs/trim)