Why this simple query works fine in oracle but doesn't work in DB2:
select *
from
sysibm.dual d1
left join sysibm.dual d2 on 1=1 and exists (select 1 from sysibm.dual)
Moving subquery-involving condition to where clause may help, but that will restrain outer join into inner.
When I try to run the query you have, I get a
-338error, which according to Information Center (see link), there are the following restrictions on theONclause:I'm not sure if it's possible with your query, but do you think perhaps you could re-write something like this: