LTRIM Function Examples | VantageCloud Lake - LTRIM 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 'XxyLAST WORD'. LTRIM removes the individual occurrences of 'x' and 'y', and stops removing characters at 'X', which is not in the expr2 argument.

SELECT LTRIM('xyxXxyLAST WORD','xy');

The following query returns the result 'LEFT TRIM'. LTRIM, removes the spaces from the left, and stops removing characters at 'L', which is not in the expr2 argument. Because the expr2 argument is not explicitly specified, the default of a single space is used.

SELECT LTRIM('  LEFT TRIM'); 

The following query returns the result 'LEFT TRIM'. LTRIM, removes the spaces from the left, and stops removing characters at 'L', which is not in the string2 argument. Because the string2 argument is not explicitly specified, the default of a single space is used.

SELECT LTRIM('  LEFT TRIM');