Page 1 of 1

Abs function is not working correctly

Posted: Thu Jul 01, 2004 3:04 am
by Prasanna
Abs function is not working correctly.
For ex:
Abs(-12.56) returns 13.00.

Posted: Thu Jul 01, 2004 5:33 am
by ANSHULA
What is the definition (SQL type, length and scale) of input and output columns ?
If output column is declared Numeric without scale specification, then
Abs(-12.56) returns 13.00
If proper scale specified, then
Abs(-12.56) returns correct value.

Posted: Fri Jul 02, 2004 6:08 am
by Prasanna
ANSHULA wrote:What is the definition (SQL type, length and scale) of input and output columns ?
If output column is declared Numeric without scale specification, then
Abs(-12.56) returns 13.00
If proper scale specified, then
Abs(-12.56) returns correct value.
Output Column has been delcared as Numeric with length 20 and scale 6.