Example

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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