1
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: dayofweek near line 1, column 155
下面是我的函數來查詢表
Session session = getSession();
Query query = session.createQuery("select count(tex.task.id)" + " from " + TestExecution.class.getName() + " tex where tex.userId=:userId and " +
"tex.executedAt >= curdate()- interval dayofweek(curdate())+6 day and tex.executedAt < curdate() - interval dayofweek(curdate())-1 DAY");
query.setParameter("userId", userId);
return (long) query.uniqueResult();
請幫助我..
這個「白天」的意思究竟是什麼,在「間隔」和「白天」之間不應該有一些標誌?出現錯誤時出現 – pezetem