Prepared statements do not allow parameterised LIMIT/OFFSET
Details
| Detail name | Value |
|---|---|
| Changelog Number | 15257 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 7.0.0, Exasol 7.1.0, Exasol 8.0.0 |
| Fix Versions | Exasol 8.7.0 |
| Resolution Date | 2022-11-01 |
Description
In prepared statements the LIMIT and the OFFSET of SELECT queries cannot be specified as parameters. I.e., "LIMIT ?" and "OFFSET ?" do not work. Instead, the error "non-negative integer value expected in LIMIT clause" is returned during the preparation of the statement.
Workaround
Integrate the values directly into the SQL statement instead of specifying them as parameters.
Fix
LIMIT and OFFSET can be specified as parameters.