I think you will need to cast to something like DECIMAL(20,2) i.e. specify
the precision and scale
On Thu, 7 Apr 2022 at 21:49, Jane wrote:
> Hi All,
>
> I am upgrading H2 from 1.4.197 to 2.1.210. I have a query which casts a
> value to DECIMAL, as - SELECT AVG(CAST(A AS DECIMAL). Column A is
Hi All,
I am upgrading H2 from 1.4.197 to 2.1.210. I have a query which casts a
value to DECIMAL, as - SELECT AVG(CAST(A AS DECIMAL). Column A is INTEGER.
In older H2, this used to produce a value like 10002.5 and in 2.1.210, the
same query produces 10002.0. What's happening internally here?