When migrating from oracle 10g to 11g, I've a stored procedure with a syntax like:
select * from table1
union
select t,y from
(select * from table2)aliasQuery
where t=aliasQuery.t
The query works well with 10g but 11g returns an error that aliasQuery is not defined.
Maybe this syntax is no longer supported in 11g or there is some missing database configurations?
EDIT
The full query is:
select *
from table1
union
select t, y
from ( select *
from table2 ) aliasQuery
where ( select max(t)
from ( select t
from table3
where table3.t = aliasQuery.t)
)>10
where. Are you sure this is correct? - Ben