Greetings:

I do not think H2 supports MATERIALIZED within WITH
CTEs: https://www.h2database.com/html/commands.html#with

Best regards
Andreas

On Fri, 2021-06-04 at 00:36 -0700, JUN LUO wrote:
> When my SQL contains materialized, some exception appeared
> 
> java.util.concurrent.ExecutionException:
> org.springframework.jdbc.BadSqlGrammarException: 
> ### Error querying database.  Cause:
> org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL
> statement "with temp_table as materialized[*] 
> 
> It successed when I remove the key word "materialized"
> 
> JDBC_URL = jdbc:h2:mem:test;DB_CLOSE_DELAY=-
> 1;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE
> 
> How to fix it?
> -- 
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/h2-database/b4e48d4e-3df1-41a7-90c7-8d899f5124f5n%40googlegroups.com
> .

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/375142efa299c91c1910b56552cc5ce6ed2ef12f.camel%40manticore-projects.com.

Reply via email to