Capturing SQL statements from the SQL editor

You can capture SQL statements that you are writing or editing in the SQL editor.

Before you begin

Procedure

To capture a query from the SQL editor:

  1. Open an SQL editor by double-clicking the SQL script that contains the query to capture. This script must be in a project in your workspace. If a script does not exist, right-click the connection to the DB2 database or subsystem and select New SQL Script. Then, add the SQL statement or statements.
  2. Right-click the open SQL script and select Start Tuning.

Results

If the script contains more than one SQL statement, the workflow assistant for query tuning opens to the Capture SQL from SQL Editor page of the Capture section.

If the script contains only one SQL statement, the workflow assistant for query tuning opens to the Run Single-Query Advisors and Analysis Tools page of the Invoke section. The statement appears in the Query Text field.

For help with the Capture SQL from SQL Editor page or the Run Single-Query Advisors and Analysis Tools page, click the Help icon (Help), or click in a portion of the page and type F1.


Feedback