Thanks Sergi, I'm not a SQL expert but I have not found any way of specifying in Sql Server SQL that the field should be read as particular type. I experimented with CAST() but this seems convert the result of first interpretting the field's content as whatever type it is declared as. Whereas what I was hoping to do was bypass the interpretation as a datetime.
I haven't looked through the H2 code but my guess is that it decides what types to make the columns in the linked table with by looking at the JDBC types of the resultset columns it receives. I thought there might be a way of coercing it to use suggested types instead, in this case a BINARY(4) rather than a TIMESTAMP. Since I've posted the original question I've come up with a cleaner solution where I don't have the datetime value in the linked table at all, but I would still be curious to know if anyone comes up with a way of doing this. Paul On Sep 29, 4:47 pm, Sergi Vladykin <[email protected]> wrote: > If it is readonly table you can pass a query insead of table name in > CREATE LINKED TABLE clause. So in this query you can convert types the > way you want.http://www.h2database.com/html/grammar.html#create_linked_table --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
