The SQL Formatter window is divided into two sections:
Provides an area for entering the SQL statement to be formatted.
Displays the formatted SQL statement after the Format function is executed. Parameters, forces and comments are highlighted for ease of recognition. The color of the text is dependent on the syntax highlight definition set under the Editor tab in the Preferences.
The SQL Formatter checks the syntax of the SQL statement. The SQL statement is formatted only if the syntax is correct. The right pane [Formatted SQL] of the SQL Formatter window shows the formatted SQL statement. If the SQL statement has an invalid object, that object is highlighted in maroon (default color).
If you open the SQL Formatter with the SQL Optimizer as the active window, the SQL statement from the SQL Optimizer window is automatically copied to the SQL Formatter window. Otherwise, enter a SQL statement into the left pane of the SQL Formatter window.
To format a SQL statement
Click .
Enter the SQL text.
Click to format the SQL statement.
To help in the construction of SQL statements
Use these functions:
To terminate the format process
Click .
Note: The SQL Format supports only a single SELECT, SELECT INTO, DELETE, UPDATE, and INSERT SQL statement.
SQL statements can have parameters either prefixed with a "@" sign or without the "@". If parameters are recognized, they are highlighted in red (default color) after executing the Format function.
Note: If table names are in maroon (default color) it indicates that the table and corresponding columns are not recognized. Check that:
The login user has sufficient privilege to access the table.
You are connected to the correct database or set user.
Make sure you have the most up-to-date database information in memory. If not, execute the Synchronize Data Dictionary function from the Database menu.
Below is a list of available functions available in the SQL Formatter window.
Button or Menu | Function |
SQL Menu
|
|
Edit Menu
|
|
Edit Menu
|
|
Edit Menu
|
|
File Menu |
|
|
|
|
|
|
|
|
|
|
|
Edit Menu
|
|
Edit Menu
|
|
Edit Menu
|
|
Edit Menu
|
|
Edit Menu
|
|
Edit Menu
|
© ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center