You can use the File menu to create
SQL and XQuery statements in the SQL and XQuery editor.
Before you begin
Create a data development 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 a file with the extension .sql.
Procedure
To create an SQL statement in the SQL and XQuery editor
by using the File menu:
- Click , and then in the New wizard,
select SQL or XQuery Script and click Finish.
- Complete the New SQL or XQuery Script wizard,
leaving SQL and XQuery editor selected.
- Click Finish. The
statement is added to the SQL Scripts folder
of the data development project that you selected in the wizard. The
statement opens in the SQL and XQuery editor.
- Complete the SQL or XQuery statement.
- 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 statement.