Problem Statement:

Receiving error:
"(ShowCase ODBC)(OS/400) SQL Negative Scale not valid."

This occurs when running a query containing a result column with a divide, expecting a value like .88.

Solution:

Use a FLOAT wrapper to help Query build correct resultant data type for the divide, as in FLOAT(EXPRESSION)/FLOAT(EXPRESSION) and it must appear on both sides of the equation.

EXAMPLE:

FLOAT(((a/b)-(c+d+e+f+g+h))) / FLOAT((a/b))

 

NOTE: The float command enables Query to recognize and complete equations by allowing more than the designated decimal places.
Without the float wrapper, an equation that returned a number such as 1.23434643216 would only be seen as 1.

 

Ref#: 1475492

 

 

 

 

Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case