Thank you very much for this hint. It does the trick.
Am 06.12.2022 um 10:55 schrieb Evgenij Ryazanov:
Your code actually constructs something like mstb_etypenum IN
(ARRAY[2, 3, 4, 5]) instead of mstb_etypenum IN (2, 3, 4, 5).
In SQL statements from JDBC (unlike in JPQL from JPA) you cannot pas
Your code actually constructs something like mstb_etypenum IN (ARRAY[2, 3,
4, 5]) instead of mstb_etypenum IN (2, 3, 4, 5).
In SQL statements from JDBC (unlike in JPQL from JPA) you cannot pass
parameters in that way. One parameter always creates one value.
You can use
mstb_etypenum = ANY(?)
i
Unfortunately, this does not solve my problem.
there is no table or column named BIGINT. The error seems to happen
within H2 when it should the Array typeArray as an arry of values to be
used in the IN clause. It seems to try to convert the Array to a single
BIGINT value for whatever reason (whi
You can do something like:
final Long[] messageIds = ...
final String sqlQuery = "SELECT * FROM FROM FOO WHERE FOO.MessageID IN (SELECT
ID FROM TABLE(ID BIGINT=?))";
PreparedStatement ps = conn.prepareStatement(sSqlQuery);
ps.setObject(1, messageIds );
--
You received this messa
I am using H2 2.1.214 and facing this problem:
part of SQL Select statement:
...
+ "where events.mstb_recno in (select mstb_recno from events
where events.mstb_edate >= ? and events.mstb_edate <= ?) and "
+ "mstb_etypenum in (?) and "
...
this statement can be prepared wit