Toad World® Forums

creating temp tables in buffer

I copied this script from another who has it working in the Toad application,

is there something i’m missing (settings?) i get a 'missing select statement error)

with all_parms as


select to_date('18_MAY_2015')       drop_date,

       to_date('18_MAY_2015') + 15  drop_date_plus15,

       to_date('18_MAY_2015') + 16  drop_date_plus16,

       to_date('18_MAY_2015') + 30  drop_date_plus30,

       to_date('18_MAY_2015') + 31  drop_date_plus31,

       to_date('18_MAY_2015') + 60  drop_date_plus60,

       to_date('18_MAY_2015') + 61  drop_date_plus61,

       to_date('18_MAY_2015') + 90  drop_date_plus90,

       '11234'                      in_pa_code

from dual




Hi Bob,

While not strictly a Toad issue, the with clause (officially known as a “subquery factoring clause”) really just creates a subquery. And a subquery needs an outer query by definition.

So Oracle (and, therefore, Toad) is expecting you to do something with the “all_parms” subquery you’ve created. Try inserting a “SELECT * FROM all_parms” in between the closing parenthesis and the semi-colon to get an idea of what this means.

For more information, see