Neoview Database Administrator's Guide (R2.3)

DD-MM-YYYY
Specify these formats in the SELECT statement while retrieving data. You must specify a
supported date format in the SELECT list of DML queries, as this example shows:
"SELECT column_a (FORMAT 'MM/DD/YYYY') FROM table"
If you do not specify a FORMAT clause, Neoview SQL returns the default format,
YYYY-MM-DD.
The FORMAT clause is not supported in DDL and is silently ignored. Specifying a particular
date format in a column definition does not cause the date values to be returned in that
format.
Input Date Formats
The FORMAT clause supports these formats for a DATE literal:
YYYY-MM-DD
MM/DD/YYYY
YY/MM/DD
YYYY/MM/DD
YYYYMMDD
DD.MM.YYYY
DD-MM-YYYY
Specify the date format in a DATE literal using this syntax:
'string' (DATE, FORMAT 'date-format')
For example:
"INSERT INTO table (date_column) VALUES (:date, FORMAT 'YYYYMMDD')"
Output 'X' Format
Formats a numeric or string operand in string format for a specified number of characters.
Example 1
>>select 123456(format 'xxx') from (values(1))t;
(EXPR)
------
123
--- 1 row(s) selected.
Example 2
>>select 'abcdef'(format 'xxx') from (values(1))t;
(EXPR)
------
abc
--- 1 row(s) selected.
String Truncation
No error is returned if truncation occurred in an INSERT or UPDATE statement.
Rounding of Arithmetic and Conversion Operators
The "HalfMagEven" semantics are supported. This mode rounds up or down based on the
number of digits being rounded and on whether the digit is odd or even. The “HalfMagEven”
equivalent is:
Roundup if right digit > 5
Roundeven if right digit =5
Example 1
select cast(12.3450 as numeric(4,2)) from (values(1))t;
(EXPR)
-------
12.34
122 Special Neoview Features—Enabled Upon Request