RTRIM Function Examples | VantageCloud Lake - RTRIM Function Examples - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following query returns the result 'TURNERyxX'. RTRIM removes the individual occurrences of 'x' and 'y', and stops removing characters at 'X', because 'X' is not in the expr2 argument.

SELECT RTRIM('TURNERyxXxy,'xy');

The following query returns the result '  RIGHTT TRIM', because the leading spaces are not removed, and stops removing characters at 'M', because 'M' is not in the expr2 argument. Because the expr2 argument is not explicitly specified, the default of a single space is used.

SELECT RTRIM('  RIGHTT TRIM   ');

The following query returns the result '  RIGHTT TRIM', because the leading spaces are not removed, and stops removing characters at 'M', because 'M' is not in the expr2 argument. Because the expr2 argument is not explicitly specified, the default of a single space is used.

SELECT RTRIM('  RIGHTT TRIM   ');