To help you build statements with correct SQL syntax, DB/Assists checks whether the syntax of the current statement is valid according to DB2.
DB/Assist validates the syntax of the statement displayed in the SQL Editor window when you perform certain operations, such as the following:
•Select the Validate push button in the SQL Editor window.
•Open a statement construction dialog box. (For a list of the
statement construction dialog boxes, see Completing the Statement Construction Dialog Boxes.)
•Select SQL Access Module Ø Verify to verify the SAM, as described in Compiling SQL Access Modules.
•Select SQL Access Module Ø Compile to compile the SAM; as described in Compiling SQL Access Modules.
Note that validation does not occur when you select SQL Access Module Ø Save or Save as to save a SAM
In all of the validation situations, DB/Assist displays a message box indicating that the syntax is correct or that there is an error.
If an error message appears, select the OK push button in the message box and correct the syntax. Then, re-validate the statement by selecting the Validate push button.
When you build a statement manually by typing it in an empty SQL Editor window, you must select the Validate push button to do the following:
•Validate the statement syntax
•Enable the SQL Statement button bar and corresponding menu choices.
If an error message appears when you validate the syntax of a statement typed in the SQL Editor window, type the correct syntax in the SQL Editor window. Do not attempt to correct the syntax by using the DB/Assist dialog boxes to rebuild the statement.