Skip to content
Advertisement

Tag: h2

How unnest h2 table’s result

I have this field now in h2 want to select it but it doesn’t work Answer UNNEST in SQL is not a regular function, it is a collection derived table. You can use it in the FROM clause:

org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement “drop table if exists [*]user CASCADE “; expected “identifier”; SQL statement:

I’ve below data.sql file in my src/main/resources/data.sql file. I would like user tabel to be created from user.csv file. When the spring application starts it always errors out with below error – Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement “drop table if exists [*]user CASCADE “; expected “identifier”; SQL statement: I’ve spent long time to figure out the error

SQL – Inster into with now() minus one day

I want change this request. Actualy this request insert into always 2021-11-11 at 10:50:00 I use a script.sql for my H2 database (continous delivery). I want change my request to Now() minus one day at 10:50:00. Answer Subtract a day from the current date, then add the time.

Single quotes cause trouble while filtering in Slick

I have statements such as below and they fail with exceptions such as this I have tried to escape the single quote but wasn’t successful. When I tried to insert a record such as this: The exception I’ve gotten is: Please note that I am using H2 in Mysql mode to run my tests. Answer That error suggests to me

Advertisement