CHAR2HEXINT Function Examples | Teradata Vantage - Example 1 - 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™

Assume that the system was enabled with Japanese language support during system initialization (sysinit).

   CREATE TABLE tab1 
               (clatin   CHAR(3)  CHARACTER SET LATIN
               ,cunicode CHAR(3)  CHARACTER SET UNICODE
               ,csjis    CHAR(3)  CHARACTER SET KANJISJIS
               ,cgraphic CHAR(3)  CHARACTER SET GRAPHIC
               ,ckanji1  CHAR(3)  CHARACTER SET KANJI1);
   
   INSERT INTO tab1('abc','abc','abc',_GRAPHIC 'ABC
','abc');

The bold uppercase LATIN characters in the example represent full width LATIN characters.

CHAR2HEXINT returns the following results for the character strings inserted into tab1.

This function … Returns this result …
CHAR2HEXINT(clatin) 616263
CHAR2HEXINT(cunicode) 006100620063'
CHAR2HEXINT(csjis) 616263
CHAR2HEXINT(cgraphic) FF41FF42FF43
CHAR2HEXINT(ckanji1) 616263