db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julius Stroffek <Julius.Strof...@Sun.COM>
Subject Re: function - returns decimal
Date Wed, 18 Jul 2007 08:12:26 GMT
Hi Mariusz,

can you provide the source for derbyextension.Derby class?

Thanks

Julo

Mariusz G wrote:
> There is a test function:
>
> create function round(a decimal(31,11), scale integer) returns
> decimal(31,11)
> parameter style java no sql language java
> external name 'derbyextension.Derby.round'; 
>
> Why this function returns decimal(31,31) instead of decimal(31,11)?
>
> ij> values round(0.225,2);
> 1
> ---------------------------------
> 0.2300000000000000000000000000000
>
> 1 row selected
>
> ij> values round(1.225,2);
> 1
> ---------------------------------
> ERROR 22003: Overflow occurred during numeric data type conversion of
> "1.23000000000". :
>
>   

Mime
View raw message