new java.sql.Date(
ORA-00932: inconsistent datatypes: expected TIMESTAMP got NUMBER
To be able to compare an Oracle Timestamp to a Java Date object, follow the steps below:
Step 1: Convert the Java Date to a String
Example:
Step 2: Use the String value in the SQL and use Oracle to_date() to convert it into Oracle date
Example:
Step 3: Cast the Oracle date into an Oracle timestamp
Example:
Reference
Oracle JDBC FAQ
0 comments:
Post a Comment