Toad World® Forums

Can I save SQL and results without using Query Builder?

I really like how Query Builder lets you save your results along with the SQL. However, if I am running many different statements in a SQL Editor window, I can’t see a way to do the same thing.

I’ve tried pasting the SQL into the Query tab of a brand new Query Builder and running them there. That part works fine, but if I try to save it, I get a message to synchronize the diagram using Visualize Query button. Once I do that, it only keeps the last statement of my SQL.

Is there a way to save the SQL as well as the results in the use case I describe?

Thanks in advance for any feedback.


Well, I take it back. Query Builder doesn’t keep just the last statement after you Visualize Query. I got confused because I went to the Diagram tab and THERE it only shows the object(s) from the last statement. However the Query tab still has all the original SQL. Confusing, but it does what I was hoping for.

If someone knows of a way to save SQL with results without using Query Builder I’d still like to know how.



Just like for the Query Builder, you can also save results from your Editor contents when you save it as a Toad Editor File.

Simply right-click on your Editor's doc tab and choose Save File, or choose File->Save off the main menu bar.
Alternatively, you can also right-click on the Editor's doc tab and select "Add File to Project Manager".

Default option is to save to a file as type SQL, which will only save the SQL query/script contents.
Change the file type to "Toad Editor File" (TEF type) which will save not only the Editor query/script, but also the result set.

See snapcap below... hope this helps!