cursor sensitivity issue

I have SQLs in Db2 LUW that I would like to run from LibreOffice (via jdbc). The SQLs work fine in the DB. However, I always get SQL error -243 when attempting to run out of LibreOffice Base (using Create Query in SQL View …).

I narrowed down to simpler queries. I get the problem when running the following.

SELECT A.COLLECTION_TIMESTAMP, B.COLLECTION_TIMESTAMP FROM MYSCHEMA.MYTABLE A , MYSCHEMA.MYTABLE B WHERE B.COLLECTION_TIMESTAMP IN ( SELECT MAX ( X.COLLECTION_TIMESTAMP ) FROM MYSCHEMA.MYTABLE X )

So I have a self join of MYSCHEMA.MYTABLE.

The DB help indicates that the cursor is defined as sensitive, and should be defined as insensitive. Unfortunately, I did not find a possibility in LlibreOffice to do so.

Can you assist ?

Thanks
Malte

Hello,

Unfortunately I don’t have db2 to test with. Using PostgreSQL from Base and a similar SQL statement there was no problem.

A bit of searching indicates this may be because of the JDBC connector. See this post → Change the cursor settings for DB2 JDBC Connections..

I have experienced other situations using Base and multiple databases where the problem was due to the connector.