You can modify existing SQL and XQuery statements in the SQL and XQuery editor.
Before you begin
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.
Prerequisite: To modify a statement in the SQL and XQuery editor,
the 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
To modify an SQL or XQuery statement in the SQL and XQuery editor:
- Switch to the Data perspective.
- In the Data Project Explorer view, expand a data project.
- Expand the folder that contains the statement to edit. Do
one of the following:
- Right-click the statement to edit, and then click on
the pop-up menu. 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 on the pop-up menu. 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 on the pop-up menu.
- Save the changes that you have made.