My query is like this:
where (:startDate is null or :endDate is null or DDATE between :startDate AND :endDate)
AND (:startDate is null or (:endDate is not null or DDATE between :startDate AND :date))
I get startDate and endDate from ajax date picker. date is the system date, which I am getting like this:
Date utiDate = new Date();
When I execute my query, I get the error:
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected DATE got BINARY
:datewith:enddate. You won't have the correct result, but you'll be sure that the problem is in the type of:dateand not in:startdateor:enddate. You should obtain a result or a different exception. - eternay