com.microsoft.sqlserver.jdbc.SQLServerException: 'CONCAT' 不是可以识别的 内置函数名称
wgcloud的servre日志里面出现如上这个错误,一般是什么原因呢
如果我们的server日志中,出现错误提示
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 'CONCAT' 不是可以识别的 内置函数名称。 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) ......
这是因为我们使用的SQLServer数据库版本比较低,不支持 CONCAT() 函数,CONCAT() 是 SQL Server 2012 及以上版本 才新增的字符串拼接函数。
解决方法,升级SQLServer数据库版本,或者使用MySQL、PostgreSQL等其它数据库