Skip to content
Advertisement

oracle sql date errors

I need your help!

I have a sql query that is executed within a jdbcTemplate like shown here :

JavaScript

Then i just make a call :

JavaScript

I made the same steps for a Update query and it works perfectly fine!! BUt in Insert query, it shows this error :

JavaScript

I think i don’t need TO_TIMESTAMP or TO_DATE because jdbcTemplate makes the conversion automatically!! When i removed TO_TIMESTAMP, i get error of type :

JavaScript

What to do !!!! By the way this object : FichierEclate e is using a property “date” of type timestamp and i am using oracle ! here is the format example of date written in my database:

JavaScript

What to do ?!!!!!!!!!!

Advertisement

Answer

From this answer, use bind variables:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement