on 06-16-2015 2:41 AM
ex: I have a query select param1/86400 from [table1]
param1 is an integer
what's the data type of param1/86400, double or decimal?
I would guess that the context is important. If you e.g. insert the result in a DOUBLE column, then it will be casted to DOUBLE.
See also SAP Note 2176091 that describes a current problem with divisions and casting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The SAP Note is released for customers, so hopefully you can see it when you check back in a few hours. The "cause" of the problem is:
The arguments of division of decimal(p,s) are casted to the expected result
precision and scale before the division, which can cause an uninteneded
overflow error when the divisor is larger than the expected result.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.