Executing a SQL File

You can execute a SQL file from the SQL File Editor or from WorkSpace Navigator.

Execute the SQL file using one of the following methods.
Option Description
From SQL File Editor
  1. Open the SQL file from the WorkSpace Navigator project folder in which it is stored by right-clicking the file and choosing Open With > SQL File Editor.
  2. Right-click in the editor, and select Execute All.
Note: If the SQL file is not connected to the connection profile with which it is associated, Execute All is disabled.
From WorkSpace Navigator Right-click the file in WorkSpace Navigator, and choose Execute SQL File.
From the toolbar
  1. Click the "Choose a .sql File to Execute" 
        Choose a SQL File to Execute icon on the Database Development perspective toolbar.
  2. Select the SQL file you want to execute from the file system, and click Open.
  3. (Optional) If you did not create a connection profile for this database type, click Create.
  4. Choose the Connection Profile Type, Connection Profile Name, and Database Name.
  5. Click OK.

The SQL file executes, and results appear in the SQL Results view. SQL Results view displays the result sets, database server messages, execution status (success or failure) and operation details.

Related concepts
Run Overview
SQL Scrapbook
Related tasks
Creating a Launch Configuration for Procedural Objects
Running a Stored Procedure
Running a Trigger
Running a SQL Anywhere or Sybase IQ User-Defined Function
Running a SQL Anywhere or Sybase IQ Event
Viewing SQL Results

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