Examples: Display Results - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
tpf1598412463935.ditamap
dita:ditavalPath
tpf1598412463935.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantage™

The display results of various FORMAT phrases for numeric data appear in the following table. For FORMAT phrases that contain G, D, L, and N formatting characters, assume that the related entries in the SDF are:

RadixSeparator {","}
GroupSeparator {"."}
GroupingRule   {"3"}
Currency       {"$"}
CurrencyName   {"US Dollars"}
FORMAT Phrase Data Result
'$$9.99' .069 $0.07
'$$9.99' 1095 ******
'ZZ,ZZ9.99' 1095 1,095.00
'9.99E99' 1095 1.10E03
'999V99' 128.457 128.46
'$(5).9(2)' 1 $1.00
'999-9999' 8278777 827-8777
'ZZ,ZZ9.99-' 1095 1,095.00
'ZZ,ZZ9.99-' -1095 1,095.00-
'99999S' -1095 0109N
'99999S' 1095 0109E
'--(8)D9(2)' 0034567890 34567890,00
'G--(8)D9(2)' -12345678.90 -12.345.678,90
'Z(I)D9(F)' 000000.42 ,42
'G-(10)9' 1234567890 1.234.567.890
'-9D99999999999999E-999' 1.74524064372835 e-2 1,74524064372835 e-002
'GLLZ(I)D9(F)' 9988.77 $9.988,77
'-Z(I)BN' 998877.66 998878 US Dollars

If the FORMAT phrase does not include a sign character or a signed zoned decimal character, then the sign for a negative value is discarded and the output is displayed as a positive number.