A third party program generated a statement like the following:
select ...
where ...
and fieldA = (fieldB in ('TXT'));
causing ORA-00907: missing right parenthesis.
So I broke it down to an example:
select * from dual
where 'X' = (dummy in ('X'));
or
select * from dual
where (dummy = (dummy in ('X')));
causing the same error. Of course it can be simplified like,
select * from dual
where dummy in ('X');
which works just fine. My questions however are:
- Why is it an ORA-00907 error?
- I feel like this syntax could actually be helpful in some case, is there a way to make it work?
- As it was a generated statement, has it something to do with the oracle version (using 12c)?
greetings