-1

尝试传递日期参数时出现 rhis 错误。有人知道吗?

public List <Object[]>getMontantParVehicule(Date d1,Date d2) {

    Session session=HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    System.out.println("Stat HQL");
    SQLQuery q=session.createSQLQuery("select IMMAT,SUM(PRIX) as          COUT,SUM(QUANTITE) as QUANTITE,COUNT(IMMAT) as nbre from BON_ESSENCE where DATE_BON beetwen     :debut and :fin  GROUP BY IMMAT ");
  //  Query q =session.createQuery("select immat,sum(prix) as mnt from BonEssence group by   immat  ");
    q.setParameter("debut",d1  );
    q.setParameter("fin",d2  );
return q.list();
4

1 回答 1

1

您将“between”拼写为“beetwen”试试这个:

where DATE_BON between
于 2013-08-08T14:08:11.980 回答