The Database Explorer window can also be used to display your existing queries, saved-results and saved-charts. This can be done by clicking on the Queries button in the toolbar (or View > Queries).
A window such as the following is displayed:
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.
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, saved-results and saved-charts within the directory selected in the left panel.
the right panel shows your query text, query contents (right-click the query to select this) or chart details.
The Query Explorer will show you Queries (which have a file type of sql), Saved-Results (which have a file type of grd) or Saved-Charts (which have a file type of xcf). Files with other suffixes (ddl, txt etc) are not shown.
The drop-down list above the query-list allows you to select which types of files you wish to see.
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
the buttons at the top of the middle-panel allow you to edit / rename or delete files
After selecting a saved-chart, you can right-click the chart for options. This will include:
Refresh. This will refresh the chart with current data. AQT will rerun the query which provides the data for the chart; you need to be signed onto the database this query uses in order to refresh the chart.
Save. If you have refreshed the chart, you can update the saved-chart with the current version of the chart.
Save as. This allows you to save the chart with as a different file name. Note that you will not see this new file in the list-of-queries until you hit the Refresh button or hit F5.
View / Edit chart in Chart window. This opens the chart in the Chart window. This allows you to manipulate or alter the chart.
Print, Export. The options allow you to export or print the chart.
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.