CHARACTER_LENGTH Usage Notes - 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

CHARACTER_LENGTH is the ANSI form of the Teradata CHARACTERS function. Use CHARACTER_LENGTH instead of CHARACTERS for ANSI SQL:2011 conformance.

Use CHARACTER_LENGTH in place of MCHARACTERS. (MCHARACTERS is no longer documented because its use is deprecated and its support ends when KANJI1 support ends.)

To suppress trailing pad characters from the character count for a data value, use the TRIM function on the argument to CHARACTER_LENGTH. For example:

SELECT CHARACTER_LENGTH( TRIM( TRAILING FROM Name ) ) 
FROM Employee;