The ABS function returns the absolute value of a number.
The data type and length attribute of the result are the same as the data type and length attribute of the argument value, except that the result is a large integer if the argument value is a small integer, and the result is double-precision floating point if the argument value is single-precision floating point.
If the argument can be null, the result can be null; if the argument is null, the result is the null value.
Syntax alternatives: ABSVAL is a synonym for ABS. It is supported only for compatibility with previous DB2(R) releases.
SELECT ABS(:PROFIT) FROM SYSIBM.SYSDUMMY1Returns the value 50000.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.