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

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

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.