The following query works just fine in SQLPLUS but returns an ORA-00942 (table or view does not exist) in TOAD (v.126.96.36.1992):
with my_thing as (select max(install_id) "MAXID" from sys.dba_registry_sqlpatch) select p.* from sys.dba_registry_sqlpatch p, my_thing where p.install_id = my_thing.maxid;
The mischief seems to be the p.*. When I replace that with specific columns, TOAD's error report goes away and the query runs. What is strange is that TOAD highlights 'max' in the with clause as the offending 'table'. SQLPLUS executes this query exactly as shown above without error.