SELECT FIELD1, FIELD2...
FROM VIEW1
WHERE ID IN (SELECT DISTINCT ID FROM TABLE1 WHERE NAME_FIELD LIKE '%ABC%')
ORDER BY FIELD1, FIELD2;
When select from a view, one of the condition is this WHERE ID IN (subquery). The oracle error as in title is raised.
But if I ran the subquery first, then replace the subquery with the returned IDs, it is working.
Or if I attached the subquery inside of the view query, it is also working.
What have I done wrong? Thanks.
select * from VIEW1
? – Aleksej