VALUES yields data exception for some DECIMAL value combinations
Details
| Detail name | Value |
|---|---|
| Changelog Number | 8957 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | EXASOL 6.0.0, Exasol 6.1.0, Exasol 6.2.0 |
| Fix Versions | Exasol 7.0.0, Exasol 6.2.3 |
| Resolution Date | 2019-10-22 |
Bug
The VALUES clause yields the error "data exception - numeric value out of range" if it contains at least two rows containing DECIMAL values for the same column fulfilling the following conditions: There is at least one small number with many decimal places and at least one bigger number with fewer decimal places.
Example
select * from (values
( 0.00000000000000001), -- DECIMAL(17,17)
(10) -- DECIMAL(2,0)
);
Workaround
Cast one of the values to a DECIMAL type big enough for all values:
select * from (values
(cast(0.00000000000000001 as decimal(19,17))),
(10)
);