The sign value function returns a +1, 0, or -1, depending on whether a numeric value is positive, zero, or negative, respectively.
Syntax:
►►─┬─ SIGV ───────┬─ (value) ─────────────────────────────────────────────────►◄ ├─ SIGN-VAL ───┤ └─ SIGN-VALUE ─┘
Invocation names:
SIGV SIGN-VAL SIGN-VALUE
Parameters:
Specifies the numeric value whose sign is determined.
Example:
This example moves a zero to the SIGN column if an amount is negative, a one to the column if the amount is positive, or a zero to the column if the amount is zero. The initial value of OPER1 is -453.29.
select sigv(oper1) as 'sign' from table1 SIGN = -1
|
Copyright © 2013 CA.
All rights reserved.
|
|