HQL语句里面不能加括号? 没加之前是对的select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and entry.cellAddress like '%C%' or entry.cellAddress like '%D%' order by entry.reportContentDefinition.id,但是sql不对满足不了要求,现在加了直接hql: select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and (entry.cellAddress like '%C%' or entry.cellAddress like '%D%')order by entry.reportContentDefinition.id 都不对了,请问下该怎么弄,谢谢。
org.springframework.orm.hibernate3.HibernateQueryException: unexpected char: 0xA3 [ select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and (entry.cellAddress like '%C%' or entry.cellAddress like '%D%')order by entry.reportContentDefinition.id]; nested exception is org.hibernate.QueryException: unexpected char: 0xA3 [ select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and (entry.cellAddress like '%C%' or entry.cellAddress like '%D%')order by entry.reportContentDefinition.id]
org.hibernate.QueryException: unexpected char: 0xA3 [ select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and (entry.cellAddress like '%C%' or entry.cellAddress like '%D%')order by entry.reportContentDefinition.id]
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:165)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)hqlexception
org.springframework.orm.hibernate3.HibernateQueryException: unexpected char: 0xA3 [ select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and (entry.cellAddress like '%C%' or entry.cellAddress like '%D%')order by entry.reportContentDefinition.id]; nested exception is org.hibernate.QueryException: unexpected char: 0xA3 [ select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and (entry.cellAddress like '%C%' or entry.cellAddress like '%D%')order by entry.reportContentDefinition.id]
org.hibernate.QueryException: unexpected char: 0xA3 [ select entry.cellAddress from com.fuhe.yjh1104.dbaccess.dao.EntryConversionFunction entry where entry.standReportId = 1277 and entry.entryConversionFunction like '%A3302%33370%' and (entry.cellAddress like '%C%' or entry.cellAddress like '%D%')order by entry.reportContentDefinition.id]
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:165)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)hqlexception
解决方案 »
- 线程同步
- div 浏览器兼容问题
- html使用ajax+cookie session丢失,改为jsp就可以了
- 大侠们,我刚毕业的,进了一间公司,老板就要求设计一个struts2权限管理的数据库设计
- Acegin 的一个问题 懂的进来帮个忙
- 關于Strus鐵代中同一個名字命名html:txt的問題。
- 求助一段java代码
- 如何用一个xmlspy验证一个schema document 是否有效,急,急 100分 ,
- 在Resin中如何定义jsp文件路径?
- 提问。
- Struts2 Unable to load configurationstruts2-core-2.3.15.1.jar!/struts-default.xm
- WAS部署的奇怪问题
难道说是中文括号'('的原因么?