I didn't notice TIMESTAMPADD, thanks! Boris.
On Feb 7, 6:36 am, Thomas Mueller <[email protected]> wrote: > Hi, > > The H2 parser doesn't currently understand INTERVAL. What you could do > is use TIMESTAMPADD, which is supported by both H2 and MySQL: > > http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#f... > > http://h2database.com/html/functions.html#dateadd > > I guess I will have to add the INTERVAL syntax. > > > "free-form parameters" > > I don't know... it would mean for some of the parameters the function > is responsible for parsing, but that would complicate things quite a > lot. For example: > > SELECT DATE_ADD(now(), INTERVAL (X+Y+?) DAY) from ... > > Who would be responsible to parse X+Y+? (a parameter). It would > require quite a lot of new API. If possible, I would try to avoid > that. > > I guess it would be easier to support INTERVAL ... <unit> as a new > data type. Anyway it seems this is required at some point. > > Regards, > Thomas -- 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.
