Executing a SQL File

There are several ways to execute a SQL file.

To execute a SQL file from the context menu inside SQL Editor:

  1. Open a SQL file from the WorkSpace Navigator project folder in which it is stored.

  2. 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.

  3. Select Execute All. SQL Results view displays the result sets, database server messages, execution status (success or failure) and operation details.

    Note

    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:

  1. 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:

  1. Click "Choose a .sql File to Execute" on the toolbar in the Database Development perspective.

    The Choose a .sql File to Execute dialog appears.

  2. Select the SQL file you want to execute from the file system and click Open. The Select Profile for the Editor dialog opens.

  3. Choose the Database type, Connection profile name, and Database name.

    Note

    If you have not created a connection profile for this database type, click Create... , which launches the Create Connection Profile wizard.

  4. Click OK.

    Execution results appear in SQL Results view.

Opening a SQL File

Saving a Procedural Object Definition as a SQL File

Running a Procedural Object

Creating an ASA Connection Profile

Creating an ASE Connection Profile

Creating an ASIQ Connection Profile

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com