Example - 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ā„¢

To find the internal hexadecimal representation of all table names, submit the following SELECT statement using CHAR2HEXINT.

   SELECT CHAR2HEXINT(TRIM(t.tablename))(FORMAT 'X(30)')
   (TITLE 'Internal Hex Representation of TableName')
   ,t.tablename (TITLE 'TableName')
   FROM dbc.tables T
   WHERE t.tablekind = 'T'
   ORDER BY t.tablename;

Partial output from this SELECT statement is similar to the following report:

   Internal Hex Representation of TableName   TableName
   ----------------------------------------   ----------------
   416363657373526967687473                    AccessRights
   4163634C6F6752756C6554626C                  AccLogRuleTbl
   4163634C6F6754626C                          AccLogTbl
   4163636F756E7473                            Accounts
   4163637467                                  Acctg 
   416C6C                                      All
   436F70496E666F54626C                        CopInfoTbl