According to the SQL Standard, result of subtraction of one datetime value 
from another is an interval, but Oracle violates the Standard and returns a 
DATE JULIAN for (DATE - DATE) and NUMBER for (TIMESTAMP - TIMESTAMP) for 
historic reasons. H2 does not provide compatibility on that level, that's 
too much, H2 is not an emulator of other databases.

It works in older versions of H2 only because they also violate the 
Standard and incorrectly return BIGINT values from that subtraction 
operation. H2 was fixed in 1.4.198, so you can try to use 1.4.197 if you 
cannot rewrite your query in some correct way. Unfortunately, it looks like 
Oracle, at least version 18c, doesn't support the datetime and interval 
arithmetic from the Standard well enough and you need different queries for 
Oracle and H2.

-- 
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 h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/d3356451-61b9-4dfa-b490-c02d67b906b1%40googlegroups.com.

Reply via email to