Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle function “TO_NUMBER” not supported in H2 database

Tags:

h2

Function TO_NUMBER is in a H2 roadmap for 1.4.x as priority 2. But in the last version 1.4.196 it's still not supported. Can anyone tell me, in what version can I expect support for this function?

like image 922
JiKra Avatar asked Jan 26 '26 15:01

JiKra


1 Answers

As a workaround, execute this SQL to create the function:

CREATE ALIAS TO_NUMBER AS $$
Long toNumber(String value) {
    return value == null ? null : Long.valueOf(value);
}
$$;
like image 98
Aaron Digulla Avatar answered Jan 29 '26 13:01

Aaron Digulla



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!