@Query(value = "SELECT TRUNC(p.CREATION_DATE), SUM(p.AMOUNT)" +
" FROM PAYMENT p" +
" INNER JOIN FACTOR f" +
" ON p.PAYMENT_ID = f.FACTOR_ID" +
" JOIN VEHICLE_GATEWAY v" +
" ON v.FACTOR_ID = f.FACTOR_ID" +
" WHERE :debitTypes IS null OR f.FACTOR_TYPE IN (:debitTypes)" +
" AND p.CREATION_DATE >= :fromPaymentDate" +
" AND p.CREATION_DATE <= :toPaymentDate" +
" GROUP BY TRUNC(p.CREATION_DATE)" +
" ORDER BY TRUNC(p.CREATION_DATE)", nativeQuery = true)
Object[] getPaidDebtSummary(@Param("debitTypes") List<Integer> debitTypes,
@Param("fromPaymentDate") Date fromPaymentDate,
@Param("toPaymentDate") Date toPaymentDate);
Hi
When I run this query through spring boot app I get this error : "java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY"
but when I run it in database console in intellij it returns the result set!
Does Anyone have an idea how to solve this problem?