Result Type - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantage™

For all server character sets except KANJI1, CHARACTER_LENGTH returns the length of string_expression in characters.

If the string_expression argument is null, the result is null.

For KANJI1, the following results are obtained.

FOR this client character set … CHARACTER_LENGTH returns …
KanjiEBCDIC the length of string_expression as the number of bytes.

A mix of single and multibyte characters is expected.

If any Shift-Out/Shift-In characters are present, they are included in the result count.

KanjiEUC

KanjiShift-JIS

the length of string_expression as the number of logical characters, based on the client session character set.

A mix of single and multibyte characters is expected.

ASCII

EBCDIC

the length of string_expression as the number of bytes.

KANJI1 support is deprecated. KANJI1 is not allowed as a default character set; the system changes the KANJI1 default character set to the UNICODE character set. Creation of new KANJI1 objects is highly restricted. Although many KANJI1 queries and applications may continue to operate, sites using KANJI1 should convert to another character set as soon as possible. For more information, see KANJI1 Character Set in International Character Set Support, B035-1125.

Because trailing pad characters are considered characters, the length of the value in a CHARACTER column is always equal to the length defined for the column.

The length of the value in a VARCHAR or CLOB column is always equal to the number of characters, including any trailing pad characters, contained in that value.