Query Explorer
The Database Explorer window can also be used to display your existing queries and saved-results. This can be done by clicking on the Queries button in the toolbar (or View > Queries).
A window such as the following is displayed:
Query Directory
This display shows the queries and saved-results within your Query directory. The Query directory is the default location for saved queries, and is set with Options > File Locations. Queries not within this directory structure will not be shown on this display.
Window Layout
The Query explorer has the following layout.
- the left panel gives you the sub-directories within your Query directory.
- the middle pane shows you the queries and saved-results within the directory selected in the left panel.
- the right panel shows your query text or query contents (right-click the query to select this)
The Query Explorer will show you both Queries (which have a filetype of sql) and Saved-Results (which have a filetype of grd). Files with other suffixes will not be shown.
What you can do
After selecting a query or saved-result:
- click on the Display button to display the data
- click on the Run SQL button to edit the SQL text in the Run SQL window
- click on the Query Builder button to edit the query in the Query Builder window
- click on the Export button to Export the data
- the buttons at the top of the middle-panel allow you to edit / rename or delete files
Notes
- This window displays all queries, irrespective of which database they were run against. If you try to display a query when you are connected to a different database, it may not run successfully.
- You cannot Display or Export a query that contains action SQL (such as Inserts, Updates etc). To run these, click on the Run SQL button then run them from there.