# SQL Results View

SQL Results view displays the results of executing SQL statements, running routine objects, and creating database objects.

SQL Results view appears in the Database Development perspective and consists of a history frame and a details frame. The history frame displays the execution history for past queries. The details frame displays the status and results of the last execution. Use the view pull-down menu to filter history results and set preferences.

Table 1. SQL Results history
Field | Description
--- | ---
History Filter | Enter a query expression in the text field at the top the SQL Results history pane to filter the results that match the expression.
Status | Displays whether the operation failed, succeeded, terminated, or is still running.
Operation | Displays the SQL statement that was executed.
Date | Displays the current date and time when the operation failed, successfully executed, terminated, or reached a breakpoint.
Connection Profile | Displays the connection profile on which the corresponding operation was run.

To save SQL results, right-click in the history pane, and select Save History.

When you execute multiple queries in a SQL file containing a delimiter (such as go) using the Execute All or Execute Selected Text options, the results are grouped in a tree structure in the SQL Results view. The root node is a top-level result history. Expand this node in the SQL Results view to see the results for each individual SQL statement.

Right-click the root node of the group SQL statement and select Save History to save all the resultsets from one group execution of a set of SQL queries.

There are two modes for the details frame, single-tab and multitab:

- In single-tab mode, all results and messages appear in the same column, with messages and status at the end.
- In multitab mode, each result and message is in a separate tab.

Table 2. Text View context menu options
Option | Description
--- | ---
Find/Replace | Launches the Find/Replace dialog, which allows you to search for and replace specific text in the resultset. This replaces the data of the displayed resultset only. It does not replace the data on the server. Note: Find/Replace is enabled only when results are displayed in text mode.
Save Results | Launches the Save dialog, which allows you to save the SQL results to a project. You can choose to Save All Results or Save Current Results.
Export Results | Launches the Export All Results dialog, which allows you to save the result set to a file outside of any project for use with other applications. You can choose to Export All Results or Export Current Results.
Print Results | Allows you to print the SQL results. You can choose to Print All Results or Print Current Results.

Table 3. SQL Results tabs for multi-tab mode
Tab | Description
--- | ---
Status | Shows the interim status of running the routine object or selected text.
Parameters | For a routine object, displays the input and output parameter names, datatypes, values, and parameter types (IN, OUT, or IN/OUT).
Result n | Displays results for a SQL query in the routine object, SQL file, or selected statement.

Table 4. SQL Results buttons
Icon | Name | Action
--- | --- | ---
| Terminate Result | Terminate a long-running instance.
| Remove Result | Remove the status, result sets, and messages of a selected SQL result instance.
| Remove All Visible Results | Remove all results for completed statements from the SQL Results view.
| Display the Result in Text Mode | Toggle between text mode and grid mode.
| Display the Result in Single Tab | Toggle between single-tab and multitab display.
| Filter Results | Filter the SQL results.

Related tasks
Viewing SQL Results
Terminating Execution in SQL Results View
Exporting SQL Execution Results
Saving Execution Results to a Project
Removing Results from SQL Results View
Saving SQL Results History
Filtering SQL Results History
Related reference
SQL Results View Options Preferences
Export Format Options Preferences
History Options Preferences
Result Set Viewer Preferences