Regardless of the approach that you use to create SQL and
XQuery statements in the editor, a script that contains the statements
is connected to a specific database. However, you can connect the
script to a different database by changing the database connection.
Before you begin
Open the script that contains the SQL and XQuery statements
in the SQL and XQuery editor.
About this task
The database that the script uses determines the information
that is available when you use content assist. The database connection
also might affect the results when you run the SQL or XQuery statement.
The connection string for the current database is shown on the
left in the top border of the editor.
Procedure
To change a database connection in the SQL and XQuery
editor:
- Do one of the following actions:
- If the string No Connection is displayed,
the script is not connected to a database. Click No Connection to select or create a new connection profile that contains the database
to which you want to connect.
- In the Command pane of the editor, open the Configuration tab, and then click Select next to the Connection field.
- Right-click in the editor, and then select Use
Database Connection.
- Select or create a different connection profile in the Select Connection Profile wizard, then click Finish.
Results
The connection for the selected database is shown in the top
border of the SQL and XQuery editor. Select the connection to display
more information. The information for the selected connection is also
shown in the fields on the Configuration page in the command pane.