> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: RTRIM

> Remove trailing spaces from a string field value while keeping leading spaces. Use RTRIM to clean the end of imported text in ETL jobs.

## Description

Removes trailing spaces from a string field. Leading spaces are kept.

Only the space character is removed. Trailing tabs and line breaks are kept. To remove all leading and trailing whitespace, use [TRIM](https://www.integrate.io/docs/etl/trim.md). To remove only leading spaces, use [LTRIM](https://www.integrate.io/docs/etl/ltrim.md).

## Syntax

`RTRIM(string_expression)`

## Examples

`RTRIM('  John Smith   ')` returns '  John Smith'

`UPPER(LTRIM(RTRIM('  ab  ')))` returns 'AB'

## Return value datatype

String

## Impact of null value

If input is null, returns null.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.