17.10 - Example - Advanced SQL Engine - Teradata Database

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

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)

Assume column a is BYTE(4) and column b is VARBYTE(10).

If these columns contained the following values:

   a             b       
   ------------  ---------
   78790000      43440000 
   68690000      3200 
   12550000      332200

then this function:

   SELECT TRIM (TRAILING FROM a) || TRIM (TRAILING FROM b) FROM ...

returns:

   78794344 
   686932
   12553322