I have h2 database in server mode for my tests (oracle mode)

I can't add/subtract an interval to my date, in my spring-batch writer, 
when my request works in SQLDeveloper

How to do this whith h2
1) UPDATE MY_TABLE SET my_date = (sysdate - INTERVAL '1' SECOND);
2) UPDATE MY_TABLE SET my_date = (sysdate - NUMTODSINTERVAL(1, 'SECOND'));
3) UPDATE MY_TABLE SET my_date = (sysdate - TO_DSINTERVAL('0 00:00:01'));

Errors I met :

1) Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement 
"UPDATE 
MY_TABLE SET my_date = sysdate - INTERVAL '1'[*] SECOND"; SQL statement: 

UPDATE MY_TABLE SET MY_DATE = sysdate - INTERVAL '1' SECOND [42000-196]

2 )Caused by: org.h2.jdbc.JdbcSQLException: Function "NUMTODSINTERVAL" not 
found; SQL statement:
3) Caused by: org.h2.jdbc.JdbcSQLException: Function "TO_DSINTERVAL" not 
found; SQL statement:

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to