The SQL Worksheet allows you to enter and execute multiple SQL statements, database objects, Transact SQL scripts. Supported SQL statements include DML and DDL commands. Local temporary table operations are allowed.
The SQL Worksheet window consists of the following: Command List, Object Explorer, Editor Pane, Information Pane, and Status Bar.
Each time a command is successfully executed, the command is saved in the Command List drop-down field at the top of the window.
Provides information on database objects. It is possible to drag drop object text and name to the Editor Pane.
The top right pane is the Editor pane which is used as a work area to create, modify, and execute SQL statements or Transact SQL commands.
The bottom pane has 2 tabs: Message Log and Resultn.
Displays information, alert and error messages from each execute. This includes the date and time, Adaptive Server messages, and whether the execution was successful or not. This information is accumulative.
To clear the Message Log information
Right-click and select Clear All.
Displays the result set after executing the command in the Editor pane. There can be multiple Result tabs, one for each result set from the code that was executed.
Displays execution time while code is executing.
Specifies the state of the key functions for the Number Lock, Insert Mode, Caps Lock, and Scroll Lock.
Specifies that a modification was made to the text in the Editor pane.
Specifies the line and column position of the cursor.
Specifies the number of bytes of text in the Editor pane.
Specifies the SPID for the database session used by the SQL Worksheet. The session is not connect until the first time you execute a command.
To open the SQL Worksheet window
Click .
You can enter text into the SQL Worksheet by
Copying from the Database Explorer, the SQL Scanner, or the SQL Optimizer. (Click )
Typing the text.
Opening a file. (File | Open).
Opening a file or database object found through the Code Finder. (Right-click and select Open in SQL Worksheet)
To execute your SQL statement or Transact SQL code
Click .
To abort the execution of SQL statement or Transact SQL code
Click .
Note: In Adaptive Server when you complete a transaction, it is committed to the database.
You can retrieve the description for a table or view which gives you the column definitions, data type, and length of the column. This function is not available until text is highlighted in the Editor pane.
To retrieve the table description
In the Editor pane of the SQL Worksheet window, highlight a table or view name.
Click .
Note: The information is retrieved from the database using the sp_help procedure. Whatever text you highlight is sent to Adaptive Server as the parameter to sp_help. If you highlight an entire SQL statement, Adaptive Server executes sp_help without a parameter and executes the SQL statement. The SQL Worksheet then displays the result of both executions.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Nutzungsbedingungen Datenschutz Cookie Preference Center