on-internet
← Community

Oracle to KingbaseES migration JDBC Parameter blinding fails with data_trunc

Stack Overflow ·

Migrating an application from Oracle to KingbaseES V9 has run into a strange issue with a date query. Oracle's TRUNC was replaced with date_trunc , and the SQL itself seems fine. It works when the ? placeholders are replaced with actual values, but fails when executed using JDBC PreparedStatement with bound parameters. Environment: Source database: Oracle Target database: KingbaseES V9 JDBC driver: com.kingbase8.Driver Connection URL: jdbc: kingbase8://... Original Oracle SQL: SELECT * FROM device_inspection_data WHERE org_id = ? AND TRUNC(create_date) = TRUNC(?) SQL after migration: SELECT *

Comments

Sign in or sign up to comment and upvote.

No comments yet.