When I try to do an explain plan from the editor window I get an ORA-00905 "missing keyword" (please see the attached). When I run the SQL from the editor window the SQL runs without errors.
Turn on spool SQL to see where the problem is. Post the output here if you need to.
I tried to reproduce but cannot. If this happens again I will turn on SPOOL.
I got it reproduced. Please see the attached.Debug.SQL (26.4 KB)
I think maybe the problem is that Toad is trying to explain into PUBLIC.PLAN_TABLE instead of just PLAN_TABLE. @espotnitz, what do you have in Options -> Oracle -> General for "Explain Plan"? If PUBLIC is listed for the schema, remove it. I can reproduce this problem if PUBLIC is specified there. If you think there is some other cause, please let me know. I'll make a change for 15.1 so that we never specify "PUBLIC" even if that's what you have in the options.
I think the reason that it sometimes works is that you have the "used cached plan if possible" option checked, and when it finds the cached plan, it doesn't have to do the "explain plan into" command, so there is no error.
@avergison I think that was just a bug in very old versions of Toad.
Removing the PUBLIC fixed the isssue. Thank you
This demonstrates how UNhelpful error messages can be ...
-- ORA-00905: missing keyword