Chat now with support
Chat with Support

SQL Optimizer for DB2 LUW 4.4 - User Guide

SQL Optimizer for IBM® DB2® LUW
UsageStatistics Getting Started Options SQL Scanner SQL Optimizer SQL Formatter SQL Inspector Database Explorer SQL Repository Index Impact Analyzer Index Usage Analyzer User-Defined Temp Table Editor Functions SQL Functions SQL Information and Functions Activity Log
Tutorials About us Copyright

SQL Formatter Window

ClosedView the SQL Formatter

The SQL Formatter window is divided into two sections:

Original SQL (Left pane)

Provides an area for entering the SQL statement to be formatted.

Formatted SQL (Right pane)

Displays the formatted SQL statement. Host variables, SQL options and comments are color-coded for easy recognition. 

 

Format a SQL Statement

To format a SQL statement

  1. Click image\B_SQLFormatter.gif.

  2. If the SQL Optimizer window is opened, the selected SQL statement will automatically be copied to the SQL Formatter window. Otherwise, enter a SQL statement onto the left pane] of the SQL Formatter window.

  3. Click image\B_Format.gif.

The SQL Formatter will check the syntax of the SQL statement. Only if the syntax is correct will the SQL statement be formatted. The formatted SQL statement. is displayed in the right pane of the SQL Formatter window. 

To terminate the format process

  • Click image\B_AbortFormat.gif.

 

Host Variables within SQL Formatter

Declarations of variables within the SQL statement are allowed, prefixed with a ":" sign or without. If variables are recognized, they will be highlighted in red after executing the Format function.

Note: If table names are in red it indicates that the table and corresponding columns are not recognized. Check these things:

  • Is there sufficient privileges under the login user to access the table

  • Are you connected to the correct database and schema

  • Execute the Synchronize Data Dictionary function to make sure you have the most up-to-date database information in memory.

 

SQL Formatter Functions

Below is a list of available functions within the SQL Formatter window.

Button or Menu

Function

SQL Menu

image\B_Format.gif image\B_AbortFormat.gif

Format/Abort Format

Edit Menu

image\B_SendToSQLOptimizer.gif

Send to SQL Rewrite

Edit Menu

image\B_CopyToIndexExpert.gif

Send to Generate Indexes

File Menu

image\B_SaveSQLtoSQLRepository.gif

Save SQL to SQL Repository

File Menu

Open SQL from SQL Repository

 

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating