Re: [h2] Re: Cannot find symbol NUMERIC

2023-03-27 Thread ELIELDO MARTINS
The tip works exactly !!! Thanks for your attention. Em sex., 24 de mar. de 2023 às 22:45, Evgenij Ryazanov escreveu: > With JDBC, you can call your function either with PreparedStatement or > with CallableStatement: > > try (Connection c = DriverManager.getConnection("jdbc:h2:mem:1")) { > >

Re: [h2] Re: Cannot find symbol NUMERIC

2023-03-24 Thread Evgenij Ryazanov
With JDBC, you can call your function either with PreparedStatement or with CallableStatement: try (Connection c = DriverManager.getConnection("jdbc:h2:mem:1")) { Statement s = c.createStatement(); s.execute("CREATE ALIAS my_stored_proc AS 'BigDecimal send() { return BigDecimal.ONE; }'"); //

Re: [h2] Re: Cannot find symbol NUMERIC

2023-03-24 Thread ELIELDO MARTINS
My code is the following: CREATE ALIAS my_stored_proc AS ' import java.math.BigDecimal; @CODE BigDecimal send() { return BigDecimal.ONE; } '; // call the send routine to csmp SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate)

[h2] Re: Cannot find symbol NUMERIC

2023-03-23 Thread Evgenij Ryazanov
Hello! The valid syntax is CREATE ALIAS MY_STORED_PROC AS ' BigDecimal envia() { return BigDecimal.ONE; } '; because SQL NUMERIC data type is mapped to BigDecimal data type in Java. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To