0
session.createQuery(" from " +
                "(select att.licenceNo license,driver.driverName drivername" +
                    " from DriverAttendanceDTO att,DriverDetailsDTO driver" +
                    " where att.licenceNo=driver.licenceNo" +
                    " and att.recordStatus='A'" +
                    " and driver.recordStatus='A' )");

休止状態が私に与えている

Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ( near line 1, column 7 [ from (select att.licenceNo license,driver.driverName drivername,att.present present from com.vms.dto.DriverAttendanceDTO att,com.vms.dto.DriverDetailsDTO driver where att.licenceNo=driver.licenceNo and att.recordStatus='A' and driver.recordStatus='A' )]
    at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
    at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)

それの何が問題なのですか?

4

1 に答える 1

0

以下を削除しfrom (...)ます。

session.createQuery("select att.licenceNo license,driver.driverName drivername" +
                    " from DriverAttendanceDTO att,DriverDetailsDTO driver" +
                    " where att.licenceNo=driver.licenceNo" +
                    " and att.recordStatus='A'" +
                    " and driver.recordStatus='A'");
于 2012-07-01T07:44:44.180 に答える