I'm facing a problem where I got
"oracle.jdbc.OracleDatabaseException: ORA-01722: invalid number"
while trying to run query in my console, in the other hand I got the exact number that I want when I run it in DBeaver.
Here's my specification:
Oracle Table:
String accNumber;
String date;
String credit;
Oracle data example:
accNumber | date | credit |
---|---|---|
1 | 2022/12/12 | 2313.12 |
1 | 2022/12/12 | 23515 |
1 | 2022/12/13 | 13415.25 |
When I run query
"SELECT SUM(credit) FROM transfer_history"
in DBeaver, it runs well and I receive 39242.37
But when I run the same query in spring boot using
@Query(value = "SELECT SUM(credit) FROM table", nativeQuery = true),
I receive
"oracle.jdbc.OracleDatabaseException: ORA-01722: invalid number".
Please help