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.
In the Editor pane of the SQL Worksheet window, highlight a table or view name.
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.
To modify the data in a table
Highlight a table from the text in the Editor pane in the SQL Worksheet window.
Use the Edit button bar at the bottom of the pane to modify the data.
Note: If you create a table and enter data in the SQL Worksheet, you must synchronize the data dictionary by selecting Database | Synchronize Data Dictionary before you can use the Edit command or Edit button to modify the data.
The SQL Worksheet uses a different database session to execute the SQL and Transact SQL from the one that was created when you initially logged on. It is important to understand how using a different session affects your work in other modules.
Temporary tables created in the SQL Worksheet are not available throughout the rest of the modules. For example, if you create #temp1 in the SQL Worksheet, you are not able to use that temporary table in SQL Optimizer. Also, if you create a temporary table in the User-Defined Temp Table window, you will not be able to use it in the SQL Worksheet.
Each time you logon, information from the data dictionary is loaded into the memory of the local PC. If you make changes to the data dictionary in the SQL Worksheet, these changes are not reflected in the information that was initially stored on the local PC. For example, if you create a new table in the SQL Worksheet and then optimize a SQL statement that uses the new table, you will get a message saying that the table does not exist. This is because the data dictionary on the local PC was not updated.
To update the data dictionary
Select Database | Synchronize Data Dictionary.
The Command List stores each command that is successfully executed in a drop-down field at the top of the SQL Worksheet window. The following functions are available from the right-click menu in the Command List.
Brings up the Save Commands window so you can select which commands you would like saved to a file.
Brings up the Open Commands window so you can select which commands to load in the Command List from a list that you saved previously.
Brings up the Clear Commands window so you can select which commands you would like remove from the Command List.