When I export data from an SQL Server instance to an H2 formatted script (the goal being to run integration tests off of a data subset), the resultant script does not escape timestamp columns properly, causing syntax errors.
The problem appears to occur when using a source database with a datetimeoffset column. These result in unescaped timestamps. Interestingly, datetime2 columns in the source have no difficulty.
The result is scripts that look something like:
Insert into A.Table(ID, OffsetbasedDate, Datetime2Date) values
(2865570, 2018-05-15 13:00:00 -06:00,'2018-05-07 04:17:18.113')
The latter value parses correctly as a datetime in H2, but the former errors out on format even when quoting the output.
Anonymous
This seems to be a bug in the JTDS driver, as it works with the Microsoft JDBC driver.
I did some further tests and found out that using the Microsoft JDBC driver doesn't solve the problem entirely.
I've attached a patch (based on release 7.8.2) that hopefully solves the issue. Please replace the file "jailer.jar" with the attached one.
The patched JAR works perfectly. Thanks!
Fixed in release 7.9