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

Teradata Vantageā„¢ - Data Types and Literals

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

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

Character Meaning


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.