You can modify existing SQL statements and XQuery statements
in the SQL and XQuery editor.
Before you begin
The SQL statement or XQuery statement must exist in a data
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.
About this task
You can use the SQL and XQuery editor to modify SQL statements
that you specified in the SQL Query Builder and SQL and XQuery statements
that you created in the SQL and XQuery editor.
Procedure
To modify an SQL statement or XQuery statement in the
SQL and XQuery editor:
- In the Data Project Explorer view, expand a data project.
- Expand the folder that contains the statement to edit. Perform one of the following steps:
- Right-click the statement to edit, and then click . The statement opens in the SQL and XQuery
editor.
- Edit the SQL or XQuery statement.
- 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.
In the Connection Selection wizard, select the
database connection that you want.
- Optional: To insert the code pattern of a template
into your statement, at the insertion point, type the first few characters
of the template name, press Ctrl + Space, and then select the template
in content assist.
- Optional: To format your SQL or XQuery code,
right-click in the editor, and then click Format SQL.
- Save the changes that you have made.