You can use a physical data model in a data design project
to create SQL and XQuery statements in the SQL and XQuery editor.
Before you begin
Create a physical data model in a data design project in
the Data Project Explorer view.
About this task
The SQL and XQuery editor supports any statement that
can be run by the database to which you are connected. The statement
that you create is stored in the physical data model (.dbm) file.
Procedure
To create an SQL or XQuery statement in the SQL and XQuery
editor by using a physical data model:
- In the Data Project Explorer view, expand a data design
project, and then double-click the physical data model to open it.
- In the Data Project Explorer view, expand the physical
data model, and then expand the database.
- Right-click the SQL Statements folder
under the database, and then click New SQL or XQuery Script,
- In the New SQL or XQuery Script window, type a name for
the statement.
- Under Edit using, leave SQL
and XQuery editor selected.
- Click OK. The statement
is added to the SQL Statements folder under
the database and opens in the SQL and XQuery editor.
- Complete the SQL or XQuery statement in the SQL and XQuery
editor.
- Close the statement, and then 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.
- Close the physical data model.