String strSQLTOTAL = "select isnull(sum(a.day),0) as a1,isnull(sum(a.month),0) as a2,isnull(sum(a.year),0) as a3 "
+ "from km_report_rzrqkhs a "
+ "where a.info_date='"
+ info_date + "' ";
SQLQuery queryViewTotal = this.getBaseDao().getHibernateSession()
.createSQLQuery(strSQLTOTAL);
queryViewTotal.setFirstResult(0);
queryViewTotal.setMaxResults(1);
List<Object[]> viewTotalList = queryViewTotal.list();
这个代码中我加了 as a1 ,as a2 as a3,object[]中的数据就是对的。
料青山看我应如是
30秒到达战场
相关分类