Subject | op between different datatype |
---|---|
Author | Alberto Pesce |
Post date | 2005-05-03T08:05:39Z |
Hi all,
In a store procedure I do :
SELECT SUM(someTable.X * (someTable.Y * (1-(coalesce(someTable.Z, 0)/100))))
FROM someTable
WHERE someTable.W = :CODICE
INTO :A;
note :
A is a numeric(15,5)
someTable.X is numeric(15,5)
someTable.Y is a numeric (15,3)
someTable.Z is a numeric(5,2)
I get:
Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
Integer overflow. The result of an integer operation caused the most significant bit of the result to carry.
How can I solve this whitout change the datatype of X,Y, Z, A
Thanks!
Alberto
[Non-text portions of this message have been removed]
In a store procedure I do :
SELECT SUM(someTable.X * (someTable.Y * (1-(coalesce(someTable.Z, 0)/100))))
FROM someTable
WHERE someTable.W = :CODICE
INTO :A;
note :
A is a numeric(15,5)
someTable.X is numeric(15,5)
someTable.Y is a numeric (15,3)
someTable.Z is a numeric(5,2)
I get:
Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
Integer overflow. The result of an integer operation caused the most significant bit of the result to carry.
How can I solve this whitout change the datatype of X,Y, Z, A
Thanks!
Alberto
[Non-text portions of this message have been removed]