TO_CHAR函数在H2数据库中不可用 [英] TO_CHAR function not available in H2 database

查看:248
本文介绍了TO_CHAR函数在H2数据库中不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用H2数据库进行集成测试.该代码已经过时了,正在使用JDBC查询.

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:

我可以看到H2不完全支持TO_CHAR函数.有什么方法可以添加自定义方法,还是我应该考虑迁移到HSQL DB或任何其他数据库以进行测试.

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.3.175.自2014年1月18日起提供 TO_CHAR 函数.

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

这篇关于TO_CHAR函数在H2数据库中不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆