## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> RTRIMTEXT[RTRIMTEXT]:::quoted
RTRIMTEXT --> End((END))
```
## Purpose
The `RTRIMTEXT` SQL function trims the right side of a text by a list of trim texts. When the text ends with a trim text, the trim text is removed.
Parameters:
- Text: text to be trimmed.
- Trim Text (optional): text(s) we want to right trim from Text.
Returns: the trimmed text.