Rules - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantage™

VARGRAPHIC reports an error if the session character set is UTF8 or a single-byte character set, such as ASCII. If the argument is of type KANJI1, the only valid session character set is KanjiEBCDIC.

All characters in the string are converted into one or more graphics that are valid for the character set of the current session. For more information, see VARGRAPHIC Function Conversion Tables.

The argument cannot be of type GRAPHIC.

A result that exceeds the maximum length of a VARCHAR CHARACTER SET GRAPHIC data type generates an error.

VARGRAPHIC cannot appear as the first argument in a user-defined method invocation.

Specific rules apply to the server character set of character_string_expression.

IF the string specifies this server character set … THEN VARGRAPHIC operates as follows …
KANJI1 Shift-Out/Shift-In characters in the character_string_expression do not appear in the result string. They are required only to indicate the transition between single byte characters and multibyte characters.

Improperly placed Shift-Out/Shift-Ins are replaced by the illegal character for the character set of the session.

The SPACE CHARACTER translates to the IDEOGRAPHIC SPACE CHARACTER.

UNICODE
  • Characters with fullwidth representation in the UNICODE compatibility zone translate to that fullwidth representation.
  • Halfwidth characters from the compatibility zone translate to the corresponding characters outside the compatibility zone.
  • The SPACE CHARACTER translates to the IDEOGRAPHIC SPACE CHARACTER.
  • The control characters U+0000 - U+001F and character U+007F are converted to the VARGRAPHIC error character.
  • Other characters are left untranslated.
anything else The result is as if string were first converted to UNICODE and then translated according to the rules listed for UNICODE above.

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 Teradata Vantage™ - Advanced SQL Engine International Character Set Support, B035-1125.