Creating a SQL File

Use Database Development tools to create SQL files.

You can use an existing project to store the SQL file or create a project when you create the SQL file.

  1. In the Database Development perspective, select File > New > SQL File.

    The New SQL File wizard opens.

  2. Associate the SQL file with a project.
    To Do this
    Use an existing project Enter or select the project name in the Enter or Select the Parent Folder field.
    Create a new project Click Create Project, and follow the wizard instructions.
  3. Type the SQL file name in the field above the Advanced button.
  4. (Optional) Click Advanced to link to a file in the file system and to create, edit, or remove defined path variables.
  5. (Optional) Select a connection profile type from the Connection profile type drop-down list.
  6. (Optional) Select from the Connection profile name drop-down list.
    Note: If the a connection profile does not appear, click Create to create a new connection profile.
  7. (Optional) Narrow your database selection in the Database Name field.
  8. (Optional) Select the Do not connect now check box if you do not want to connect to the server.

    You cannot use the complete content assist feature if this check box is selected.

  9. Click Finish.

    A SQL file is created under the project in the WorkSpace Navigator. The cursor moves to either the empty SQL file in the editor or to the beginning of the file if you linked it to an existing file.

  10. (Optional) Right-click in the SQL File Editor and select Visual SQL to enter SQL statements, or type your SQL in the content window.
  11. Use Content Assist to edit the SQL statement.
  12. To add or remove comment delimiters for a line of code, right-click the line of code, and select Toggle Comment from the context menu. To add or remove comment delimiters for multiple lines, highlight the lines, right-click in the selection, and select Toggle Comment from the context menu.
  13. Right-click in the editor window and select Save File to save your changes.
Related concepts
SQL File Editor
Content Assist
Related tasks
Opening a SQL File
Editing a SQL File
Saving a SQL File
Saving a SQL File As a Template
Setting Connection Information for Multiple SQL Files
Opening a Referenced Database Object
Related reference
SQL File Editor Toolbar

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.