RTRIMTEXT
Syntax
%%{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.
See also LTRIMTEXT.
Parameters:
- Text (
varchar2): text to be trimmed. - Trim Text (optional,
varchar2): text(s) we want to right trim from Text.
Returns: the trimmed text.
Examples
The following example trims the text B.V. from the right side of Invantive B.V.:
select rtrimtext('John Doe', ' Doe')
-------------------
John
The following example repeatedly trims the text s from the right side of applesssssssssss:
select rtrimtext('applesssssssssss', 's')
-------------------
apple