Formatting Characters | Data Types and Literals | Teradata Vantage - 17.10 - Formatting Characters - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

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

Use the following characters in the FORMAT phrase to control formatting.

Character Meaning
X

X(n)

The letter X formats the display of character data. Each X represents one character. The data is returned in left-to-right order.

For example, if a column is defined as FORMAT 'X', only the first (leftmost) character of each field value is displayed.

Multiple character positions can be defined either by using the (n) notation, where n defines the length of the string, or by entering the equivalent number of X characters.

Character strings are padded or truncated on the right when they are shorter or longer than the positions defined in the FORMAT phrase.