日期:2014-05-20  浏览次数:20794 次

Hibernate 问题 , expected in SELECT
报错信息:
调用dao.createHQuery出错Exception,错误信息:net.sf.hibernate.QueryException: , expected in SELECT [select count(comment.comment) as num from com.bpcc.egov.gs12315.po.Comment as comment where comment.employeeid = '150601001002' and comment.comment = '3' and comment.workid = '100' and (comment.calltime >=? and comment.calltime <=?) group by comment.workid, comment.username order by comment.workid]
 
 使用的数据库为 SqlServer2000 在查询分析器中运行没有问题,调试程序时后台报错。


------解决方案--------------------
这个是你生成的sql语句吧,把你的hql语句发下
------解决方案--------------------
先用select count(*) from ...试试
------解决方案--------------------
同意楼上的。。