I need to create a HIGH date in HSQLDB and the solution is eluding me. I need something like
Date(9999-12-31 0:0:0)
but I cannot find a function or whatever to do it. I am loding the date via Spring on startup and i need something like:
insert intoMOD (
ITM_INST_ELECTR_MOD_STRT_TS,
ITM_INST_ID,
ELECTR_MOD_ID,
ITM_INST_ELECTR_MOD_END_TS
) VALUES (
CURRENT_DATE,
0,
0,
Date(9999-12-31 0:0:0)
)
What is the way to create a specific data using SQL in Hypersonic?
I was struggling with this problem and I think that I can contribute to help some other people.
Here is the insert that you need to put on your script while loading hsqldb:
insert intoMOD (
ITM_INST_ELECTR_MOD_STRT_TS,
ITM_INST_ID,
ELECTR_MOD_ID,
ITM_INST_ELECTR_MOD_END_TS
) VALUES (
CURRENT_DATE,
0,
0,
'9999-12-31'
)
HSQLDB converts the string automatically.
I tested with latest version (2.3.3).
Given the user guide, I'd expect the following to work:
DATE '9999-12-31'
or, if you need more than day precision:
TIMESTAMP '9999-12-31 00:00:00'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With