Hi,

I don't know, it works for me.

SELECT id, startdate, enddate FROM MCJOBHISTORY;
-- 3 rows
select id, updatedate from MCPRODINSTANCE;
-- 9 rows
SELECT min(A0.startdate) FROM MCJOBHISTORY A0
-- 2015-09-17 16:00:00.023

CREATE_BUILD is 188, where the h2.storeLocalTime problem was not fixed yet
(but that shouldn't be a problem either).

Regards,
Thomas


On Friday, September 18, 2015, IntensiveH2 <[email protected]> wrote:

> Hello Steve,
>
> I attached a new DB with user = 'DBCOCKPIT' and pwd = 'xx'.
> Note:
> As explained previously, I have an issue with query like below (I mean
> without any binding)
> SELECT min(A0.startdate) FROM MCJOBHISTORY A0
> In this case, I guess that my code is not the root cause of the issue.
>
> Regards
>
> On Wednesday, September 16, 2015 at 11:14:09 AM UTC+2, IntensiveH2 wrote:
>>
>> Hello,
>>
>> Since I use the version 1.4.189 with  an existing DB created with
>> version 1.4.188 (option like
>> MVCC=TRUE;AUTOCOMMIT=OFF;LOCK_MODE=3;LOG=2;CACHE_TYPE=SOFT_LRU;MV_STORE=FALSE
>> ), I have a lot of issue with column of kind datetime
>>
>> INFO   | jvm 1    | 2015/09/16 10:25:32 | org.h2.jdbc.JdbcSQLException:
>> Cannot parse "TIMESTAMP" constant "8"; SQL statement:
>> INFO   | jvm 1    | 2015/09/16 10:25:32 | SELECT
>> A0.idmcprodinstance,A0.id FROM MCJOBHISTORY A0 LEFT OUTER JOIN
>> MCPRODINSTANCE A1 ON A0.idmcprodinstance=A1.id WHERE ( (A0.processendstatus
>> <> ? OR  (A0.jobreturncode <> ?)) AND A0.idmcprodinstance IS NOT NULL ) AND
>>  ((A1.lastacknowledge IS NULL  OR  (A0.enddate > A1.lastacknowledge)) AND
>> A0.enddate >= ?) [22007-189]
>> ....
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | 2015/09/16 10:25:34 ERROR
>> [pperListener_start_runner] mserver.H2Listener
>> (com.infovista.mserver.H2Listener:H2Listener.java:exceptionThrown:57)
>> INFO   | jvm 1    | 2015/09/16 10:25:34 |  [DATABASE] exceptionThrown
>> sql=SELECT min(A0.startdate) FROM MCJOBHISTORY A0
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | org.h2.jdbc.JdbcSQLException:
>> Cannot parse "TIMESTAMP" constant "0"; SQL statement:
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | SELECT min(A0.startdate) FROM
>> MCJOBHISTORY A0 [22007-189]
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | at
>> org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
>> .....
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | Caused by:
>> java.lang.IllegalArgumentException: 0
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | at
>> org.h2.util.DateTimeUtils.parseDateValue(DateTimeUtils.java:303)
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | at
>> org.h2.value.ValueTimestamp.parseTry(ValueTimestamp.java:140)
>> INFO   | jvm 1    | 2015/09/16 10:25:34 | at
>> org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:120)
>> with
>> create table MCJobHistory (
>>      id                   int                            not null,
>>      parametersString     varchar(20000)                 null,
>>      idMCProdInstance     int                            null,
>>      startDate            datetime                       null,
>>      endDate              datetime                       null,
>> ......
>>
>> Maybe it's due to recent change to h2.storeLocalTime.
>> Nevertheless this issue is very annoying for me because the only way is
>> to migrate data.
>>
>> Do you have a workaround helping me?
>>
>> Regards
>>
>> --
> 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]
> <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to