If you are using an arithmetic expression to represent operand1, you must enclose the expression within parentheses. In addition, you can have multiple expressions within the parentheses. However, an arithmetic expression cannot contain any mathematical functions (MAX, AVG, and so forth).
The following is a sample WITH clause with operand1 as an arithmetic expression.
►►─┬────────┬─ operand1 ─ comparison-operator ─ operand2 ─────────────────────►◄ └─ WITH ─┘
If operand1 is an arithmetic expression, such as (FLD/A + FLD/B) the comparison is based on the precision of the object after the number is rounded. For example, assume that the value of FLD/A is .41 and the value of FLD/B is 0. If the WITH clause is
WITH FLD/A = 0.00
the WITH clause evaluates false. If the WITH clause is
WITH (FLD/A + FLD/B) = 0
the WITH clause evaluates true, because the .41 result of operand1 expression rounds to 0. If the object were specified as 0.00, no row would be found. Rounding is not required and 0.41 does not equal 0.00.
|
Copyright © 2014 CA.
All rights reserved.
|
|