Double Parentheses with IN Predicates can cause Syntax Errors
Details
| Detail name | Value |
|---|---|
| Changelog Number | 967 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | EXASOL 6.0.0, EXASolution 5.0.0 |
| Fix Versions | Exasol 6.1.beta1 |
| Resolution Date | 2018-08-29 |
Background:
Double Parentheses in combination with IN predicates can lead to syntax errors in Exasol.
Example:
SELECT COUNT(*) FROM dual WHERE ((1, 2) IN (SELECT 1, 2)); -- syntax error, unexpected IN_, expecting ',' [line 1, column 41] (Session: 1610204448423571701)
Workaround
Depends on the query. In many cases it is possible to remove the parentheses.
Example:
SELECT COUNT(*) FROM dual WHERE (1, 2) IN (SELECT 1, 2);