Creating SQL statements in the SQL builder by using a physical data model

You can use a physical data model in a data design project to create an SQL statement in the SQL builder.

The SQL builder supports creating SELECT, INSERT, UPDATE, DELETE, FULLSELECT, and WITH (DB2® only) statements. A statement that you create is stored in the physical data model (.dbm) file.

Prerequisite: Before you create an SQL statement by using a physical data model, create a physical data model in a data design project in the Data Project Explorer view.

To create an SQL statement in the SQL builder by using a physical data model:

  1. Open the Data perspective.
  2. In the Data Project Explorer view, expand a data design project, and then double-click the physical data model to open it.
  3. In the Data Project Explorer view, expand the physical data model, and then expand the database.
  4. Right-click the SQL Statements folder under the database, and then click New SQL Statement on the pop-up menu.
  5. In the New SQL Statement window, type a name for the statement.
  6. Select the template for the type of statement that you want to create.
  7. Click SQL builder.
  8. Click OK. The SQL statement is added to the SQL Statements folder under the database and opens in the SQL builder.
  9. Use the SQL builder to specify the type of statement that you selected in the New SQL Statement window:
  10. To save the SQL statement, save the physical data model (.dbm) file. When you save the physical data model, you save all the data objects in the physical data model that have outstanding changes.
Related tasks
Creating a physical data model by using a wizard
Transforming a logical data model into a physical data model
Related reference
New SQL Statement window

Feedback