There are several ways to execute a SQL file.
To execute a SQL file from the context menu inside SQL Editor:
Open a SQL file from the WorkSpace Navigator project folder in which it is stored.
If the SQL file is not attached to a connection profile, select Attach Connection Profile from the context menu to attach to the associated database.
Select Execute All. SQL Results view displays the result sets, database server messages, execution status (success or failure) and operation details.
If the SQL file is not connected to the connection profile with which it is associated, the context menu item Execute All is disabled.
To execute a SQL file from WorkSpace Navigator:
Right-click the SQL file name and select Execute SQL File from the context menu. The SQL file executes, and results appear in SQL Results view.
To execute a SQL file from the toolbar:
Click
on the toolbar in the Database Development perspective.
The Choose a .sql File to Execute dialog appears.
Select the SQL file you want to execute from the file system and click Open. The Select Profile for the Editor dialog opens.
Choose the Database type, Connection profile name, and Database name.
If you have not created a connection profile for this database type, click Create... , which launches the Create Connection Profile wizard.
Click OK.
Execution results appear in SQL Results view.
Saving a Procedural Object Definition as a SQL File
Creating an ASA Connection Profile
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com