TO_CHAR function not available in H2 database

I am using an H2 database for integration test. The code is quiet old and uses JDBC queries instead.

While running tests, I get the error below

org.h2.jdbc.JdbcSQLException: Function "TO_CHAR" not found; SQL statement: 

I see that H2 does not perform the TO_CHAR function incompletely. Is there a way to add a custom method or should I consider moving to HSQL DB or any other database for testing purposes.

+4
source share
2 answers

Use the new version 1.3.175. From 2014-01-18 is available with the TO_CHAR function.

+4
source

Of course, you can try HSQLDB. I think it supports TO_CHAR.

Or you could write a user-defined function in H2.

0
source

Source: https://habr.com/ru/post/1493171/


All Articles