JPSQL HQL 执行错误,请问怎样改正?

MTTT 发布于 2015/04/16 16:23
阅读 862
收藏 0

云原生2.0展望丨从“小众”到“首选”,推动云原生产业落地华为云作用几何?>>>

SELECT  productCategory FROM ProductCategory  WHERE parent = 12 AND SUBSTRING(treeCode,LENGTH(treeCode)-1,LENGTH(treeCode))  = 
(SELECT  MAX(SUBSTRING(treeCode,LENGTH(treeCode)-1,LENGTH(treeCode))) FROM ProductCategory WHERE parent = 12)

错误信息;
16:20:26.998 [http-8080-6] ERROR o.h.hql.internal.ast.ErrorCounter - <AST>:1:93: unexpected AST node: (
16:20:27.005 [http-8080-6] ERROR o.h.hql.internal.ast.ErrorCounter - <AST>:1:93: unexpected AST node: (
antlr.NoViableAltException: unexpected AST node: (
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:2084) [hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:2001) [hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:794) [hibernate-core-4.2.1.Final.jar:4.2.1.Final]

加载中
返回顶部
顶部