What seems to be wrong with my hql query?
String queryString = "SELECT A.INITIAL, A.NUMBER, A.OWNR_SCAC , A.INITIAL||A.NUMBER AS CAR," +
"A.LESSEE_SCAC, A.TRUK_CNT, A.EQP_TYP_CD, A.AXL_CNT, B.STABILITY_DEV_EQP," +
"A.C_CNT, A.G_WGT, B.TRUK_AXL_CNT, A.EIN FROM DS.E_UT AS A" +
"LEFT JOIN DS.E_PRIMARY AS B" +
"WHERE A.INITIAL||A.NUMBER IN (:carList) AND A.INITIAL IN {:initList) AND A.NUMBER IN (:numberList)" +
"AND B.TRUK_AXL_CNT > 0";
ERROR:
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: A near line 1, column 263
I assume it is talking about the A after FROM DS.E_UT AS A
In HQL you do not give the table and column names. Instead you give the Java class names and member variable names (or getter/setter) names of the classes and member variables which you mapped to the tables and columns.