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.
  2. Associate the SQL file with a project.
    To Do this
    Use an existing project Enter or select the project in the Enter or Select the Parent Folder.
    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.
  6. (Optional) Select a Connection Profile Name.
    Note: If no connection profiles exist, select Create to create one.
  7. (Optional) Select Database Name.
  8. (Optional) Select Do Not Connect Now to remain disconnected to the server.

    You cannot use the complete Content Assist feature if you select this option.

  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. Type directly into the editor or use Content Assist to create the SQL statements.
  12. (Optional) 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.
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

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