Neoview SQL Reference Manual (R2.4)

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 ( '20090217' (date, FORMAT 'YYYYMMDD') )"
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
Example 2
12.3450 rounded to scale 2 = 12.34
12.3350 rounded to scale 2 = 12.34
12.3451 rounded to scale 2 = 12.35
12.3360 rounded to scale 2 = 12.34
12.3330 rounded to scale 2 = 12.33
NOTE: The “HalfMagEven” mode is also known as unbiased rounding, convergent
rounding, statistician's round, Dutch rounding, or bankers' rounding.
Precision and Scale of Arithmetic Operations
The maximum precision is limited to 18. If an arithmetic computation exceeds this precision,
Neoview SQL returns an overflow error. The scale of the result is computed using the
semantics of your previous DBMS.
Multiplication
op1 * op2
Result scale = op1scale + op2scale
Division
op1 / op2
Result scale = MAXOF(op1, op2)
Examples
10*6 => 60 10/6 => 2
10.0*6 => 60.0 10.0/6 => 1.7
10.00*6.0=> 60.000 10.00/6 => 1.67
Ignore Duplicate Keys
The “Ignore Duplicate Keys” feature simulates SET Table support and provides the same
semantics with one exception: Rows with duplicate keys are ignored during insert operations.
To disable this feature, contact HP Support for assistance in setting the
IGNORE_DUPLICATE_KEYS default to 'OFF.'
514 Special Neoview Features—Enabled Upon Request