Reputation: 23
i have a query that i want to run it using hibernate native sqlQuery
when i run query using sql developer it works fine but when hibernate run it ,it throws this exception
.
.
.
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:82)
.
.
.
Caused by: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
here is my sql query:
SELECT car_id,car.plate FROM car WHERE car.plate LIKE '%12%' ORDER BY CAR.CAR_ID;
please help me ,
thanks in advance
Upvotes: 1
Views: 1742
Reputation: 179
Hibernate is case sentitive, write your sql statement in lower case. Example:
select car_id,car.plate from car car where car.plate like '%12%' order by car.car_id asc;
Upvotes: 0