That is invalid syntax. You are mixing relational expressions with scalar operators (OR
). Specifically you cannot combine expr IN (select ...) OR (select ...)
. You probably want expr IN (select ...) OR expr IN (select ...)
. Using union would also work: expr IN (select... UNION select...)