java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: null near line 1, column 226 [SELECT COUNT(*) FROM com.pmp.vupadhi.model.EmpLeave WHERE ((start_date >=:startdate AND start_date <=:enddate) OR (end_date >=:startdate AND end_date <=:enddate)) AND em_id =:id AND (leave_status !=103 AND leave_status !=104]
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Community– Community Bot2021-09-10 11:49:40 +00:00Commented Sep 10, 2021 at 11:49
Add a comment
|
3 Answers
Can you try <> operator for not equal to.
leave_status <> 104
Also give an alias and then do COUNT(alias) instead of a *.
1 Comment
Srinivasulu Ch
still getting the same error but in column 235......thanks for u r effort
You might have a null parameter even when you do not expect that. Try logging the parameters like described in https://www.baeldung.com/hibernate-logging-levels and check for null values.