SQL/MX Report Writer Guide
Customizing a Report
HP NonStop SQL/MX Report Writer Guide—527194-002
4-32
Using the AS Clause to Modify the Default Report
Format
Using the AS Clause to Modify the Default Report Format
If the default display produces a format that does not suit your needs, you can use the
AS clause to modify the field width, adjust the scale of a number, insert special
symbols called decorations, and change the justification of a character value.
You can use the AS clause to override the default format for any data type, with these
exceptions:
•
DATE
•
DATETIME
•
INTERVAL
•
TIME
•
TIMESTAMP
Display Format Specifications
A display format specification can include several elements: display descriptors,
scalesign descriptors, decorations, and modifiers:
n Length
vw Current VARCHAR_WIDTH value
s Scale of the data type
i Integer
A, I, F For more information, see Display Format Specifications
on page 4-32.
E Edit descriptor, explained in the Guardian Programmer's Guide
DATE
DATETIME
TIME
TIMESTAMP
INTERVAL
yyyy-mm-dd
yyyy-mm-dd:hh:mm:ss.msssss
hh:mm:ss
yyyy-mm-dd:hh:mm:ss.msssss
yyyy-mm or dd:hh:mm:ss.msssss
yyyy Years
-mm Months
dd Days
hh Hours
:mm Minutes
ss Seconds
msssss Microseconds
Table 4-1. Default Display Formats (page 2 of 2)
SQL Data Type Default Display Format