SQL Results View

SQL Results view displays the results of executing SQL statements, running procedural 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:
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 procedural object or selected text.
Parameters For a procedural 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 procedural object, SQL file, or selected statement.
Message n Contains messages from the database server, such as the output of a SQL print statement.
Table 4. SQL Results buttons
Icon Name Action
Terminate Result 
        Terminate Result Terminate a long-running instance.
Remove Result 
        Remove Result Remove the status, result sets, and messages of a selected SQL result instance.
Remove All Finished Results 
        Remove All Visible Results Remove all results for completed statements from the SQL Results view.
Display Result as Text 
        Display the Result in Text Mode Toggle between text mode and grid mode.
Display Result in single tab 
        Display the Result in Single Tab Toggle between single-tab and multitab display.
filter results Filter Results Filter the SQL results.
In the Display Mode, you can choose the mode in which to display SQL resultsets:
Related concepts
SQL Results History
Related tasks
Viewing SQL Results
Removing Results from SQL Results View
Grouping SQL Results
Searching SQL Results
Terminating Execution of Procedural Objects and SQL Statements
Filtering SQL Results History
Saving a SQL Result History
Related reference
SQL Results History Fields
SQL Results History Save Options

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com