When an SQL Editor window includes more than one statement, the results of a query are by default displayed in separate result tabs with consecutive numbers: Result1, Result2, etc. To change this default display mode, turn on the Show multiple results stacked option in the SQL Editor toolbar. When executing a script containing more than one query, only one result tab is displayed, and the results of the individual queries are displayed in separate panes of that tab. Note that you can change the display mode also after the query has been executed.
To display multiple queries in one result tab:
|1.||In the SQL Editor toolbar, switch the Show multiple results stacked option on.|
|2.||Click the Execute button or press F5.|
Only one result tab has been created. It consists of two panes however, each containing the result of the individual queries.
The status bar of the Result window can display statistical information about any cells selected in the result grid, which includes:
|•||Number of selected cells (in the status bar, this statistic is shown as Count)|
|•||Number of selected cells that have a numerical data type (Numeric count)|
|•||The average value of all selected numeric cells (Average)|
|•||The minimum and maximum value of all selected numeric cells (Min and Max)|
|•||The sum of all selected numeric cells (Sum)|
|•||The data type of a cell.|
To view statistical information in the Result window, select one or more cells in the result grid. The values for the activated statistical fields are displayed in the status bar.
Not all statistics are enabled by default. To enable or disable a particular statistic, right-click the status bar and select the corresponding option from the context menu.
Note that the Count option displays the number of all selected cells, while the Numerical Count omits cells that do not have a numerical data type. Naturally, the Average, Min, Max, and Sum values are based on the numerical count.
When a single cell is selected, its data type is additionally displayed in the status bar.
If you want to keep a particular result, you can pin the corresponding tab in the Result window. DatabaseSpy offers a toolbar button as well as several options in the context menu that opens when you right-click a tab in the Result window for this purpose. When the button is toggled on, the Result tab remains visible even if different queries are executed and new Result tabs are generated. Pinned result tabs show a different icon.
Note that pinned results show a different icon in the tab. When viewing pinned results, please bear in mind that the SQL statement displayed in the SQL Editor window above the Result tab might have been changed since the query has originally been executed and that re-executing the query may display a different result.
To pin a result tab:
|1.||Execute a query and display its results in the Result window.|
|2.||In the Result window, do one of the following:|
|•||To pin an individual result, click the Keep result visible button in the toolbar of the respective Result window or right-click the tab and select Keep result visible from the context menu.|
|•||To pin all results that are currently displayed in the Result window, right-click any result tab and select Keep all results visible from the context menu.|
Any pinned tab is kept in the Result window even if new queries are executed, and new Result tabs are generated.
To release a pinned result tab:
Do one of the following:
|•||To unpin a result, click the Keep result visible icon again, or right-click a pinned result tab and choose Remove permanent visibility for result from the context menu.|
|•||To unpin all results in the Result window, right-click any result tab and select Remove permanent visibility for all results from the context menu.|
© 2019 Altova GmbH