当前位置:编程学习 > JAVA >>

查询编号从0001-0007没问题 到0008或0009就出现下面报错

2012-01-05 14:01:03 [org.hibernate.hql.PARSER]-[ERROR] *** ERROR: line 1:61: unexpected token: 8 -(35)
2012-01-05 14:01:03 [org.hibernate.hql.ast.HqlParser]-[WARN] processEqualityExpression() : No expression to process! -(193)
org.hibernate.hql.ast.QuerySyntaxError: unexpected token: 8 near line 1, column 61 [from edu.usc.vo.CheckResult as cr where cr.cr_accept in (0008) and cr.cr_cp_id in (10,9) order by cr.cr_accept , cr.cr_cp_id desc ]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215) --------------------编程问答-------------------- 我的建议是仔细想想数据库中到0008或0009的数据,包括外键什么的和0001-0007的区别,把sql语句化简,看看是不是语句出错,加油啊 --------------------编程问答-------------------- 这条件真是怪异啊,你1到7的时候,sql是什么样的?
where cr.cr_accept in (0008)
补充:Java ,  Eclipse
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,