Modifying SQL statements in the SQL editor

You can modify existing SQL statements in the SQL editor.

You can use the SQL editor to modify statements that you specified in the SQL builder and statements that you created in the SQL editor.

Prerequisite: To modify an SQL statement in the SQL editor, the statement must exist in a data development project or a data design project in the Data Project Explorer view. In a data design project, the SQL statement can be located in either the SQL Scripts folder or the SQL Statements folder in a physical data model.

To modify an SQL statement in the SQL editor:

  1. Switch to the Data perspective.
  2. In the Data Project Explorer view, expand a data project.
  3. Expand the folder that contains the SQL statement to edit. Do one of the following:
    • Expand the SQL Scripts folder in the data project.
    • In a data design project that contains a physical data model, expand the Data Models folder. Double-click a physical data model (.dbm) file to open it. Expand the physical data model, the database, and the SQL Statements folder.
  4. Right-click the SQL statement to edit, and then click Open With > SQL Editor on the pop-up menu. The statement opens in the SQL editor.
  5. Edit the SQL statement.
  6. Optional: To establish or change the database connection that is associated with the statement, right-click in the editor, and then click Use Database Connection on the pop-up menu. In the Connection Selection wizard, select the database connection that you want.
  7. Save the changes that you have made.
    • If you are modifying an SQL statement that is in an SQL Scripts folder in a data project, save the statement.
    • If you are modifying an SQL statement that is in a physical data model, save the physical data model. When you save the physical data model, you save all the data objects in the physical data model that have outstanding changes.

Feedback