TO_CHAR function not available in H2 database

我怕爱的太早我们不能终老 提交于 2019-12-07 10:52:19

问题


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

While running tests i am getting the error below

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

I can see that H2 does not implecitely supports TO_CHAR function. Is there any way to add a custom methor or should i think about moving to HSQL DB or any other database for testing purpose.


回答1:


Use the newer version 1.3.175. Since 2014-01-18 available with a TO_CHAR function.




回答2:


You could try HSQLDB of course. I think it does support TO_CHAR.

Or you could write a user defined function in H2.



来源:https://stackoverflow.com/questions/17832394/to-char-function-not-available-in-h2-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!