16.10 - Hexadecimal Representation of Object Names - Teradata Database

Teradata Database SQL Fundamentals

Product
Teradata Database
Release Number
16.10
Published
June 2017
Content Type
Programming Reference
Publication ID
B035-1141-161K
Language
English (United States)
Last Update
2018-04-25

All object names are stored in the Data Dictionary in UNICODE. However, in an international environment, some client users may find that their client (session) character set cannot express an object name created on another client. In these cases, clients may find it useful to use a hexadecimal representation of the unavailable UNICODE characters in the object name to more easily access the object.

Using Delimiters with Hexadecimal Identifiers

When you reference a database object using a hexadecimal representation of the object name, you must express it as a name literal or enclose the name in UNICODE delimiters.

The best practice is to use UNICODE delimited identifiers because the hexadecimal value remains the same across all supported character sets, whereas using hexadecimal name literals allows the name representation to vary depending on the character set.

Example: Using UNICODE Delimited Identifiers

Consider a table name of where the translation to the UNICODE server character set is equivalent to the following Unicode delimited identifier:

   U&"#FF83#FF70#FF8C#FF9E#FF99" UESCAPE '#'

From a client where the client character set is KANJIEUC_0U, you can access the table using the following hexadecimal name literal:

   '80C380B080CC80DE80D9'XN

From a client where the client character set is KANJISJIS_0S, you can access the table using the following hexadecimal name literal:

   'C3B0CCDED9'XN

Example: Using Hexadecimal Name Literals

Assume that a hexadecimal name literal that represents the name TAB1 using full width Latin characters from the KANJIEBCDIC5035_0I character set on a system enabled for Japanese language support:

   SELECT EmployeeID FROM "0E42E342C142C242F10F"XN;

Teradata Database converts the hexadecimal name literal from a KANJI1 string to a UNICODE string to find the object name in the Data Dictionary.

Here is an example of a Unicode delimited identifier that represents the name TAB1 on a system enabled for Japanese language support:

   SELECT EmployeeID FROM U&"#FF34#FF21#FF22#FF11" UESCAPE '#';