What are the data types of col1 and col2?
I don't know the rules in QMF.
But, result data type of decimal division in DB2 is clear.
Quote:
Decimal arithmetic in SQL
...
...
Division: The precision of the result of division is 31. The scale is 31-p+s-s'. The scale must not be negative.
|
Data type of the result you want(1.3133) woud be DECIMAL(31,4).
To get the result DECIMAL(31,4), 31-p+s-s' = 4.
Then, p-s+s' = 27
Example:
DECIMAL(31,4)/DECIMAL(p',0) = DECIMAL(31,4) (where 1 <= p' <= 31)