Validating SQL and XQuery statements

You can validate the syntax of SQL and XQuery statements in the SQL and XQuery editor. You also can validate the table and column references in SQL and XQuery statements.
Before you begin

The syntax in SQL and XQuery statements is validated by parsing the statements to determine whether keywords and their location in the statements are valid. Parsing is based on the type of database that the statements are connected to through their associated data project.

Table and column references are validated only in SQL DML statements. The validation process determines whether the tables that are referenced in the statements exist in the connected database and whether the referenced columns exist in the table that they are associated with.

You can validate existing SQL and XQuery statements when you open their script in the SQL and XQuery editor. You also can validate SQL and XQuery statements while you are creating them or editing them in the editor.

To control whether validation occurs when you open an existing SQL or XQuery script in the SQL and XQuery editor, set the validation options on the SQL and XQuery Editor page in the Preferences window (Window > Preferences).

About this task
To validate SQL and XQuery statements in the SQL and XQuery editor:
  1. To validate the syntax of the statements, right-click in the editor, and then select Validate Statement Syntax.
  2. Optional: To validate table and column references in the statements, right-click in the editor, and then select Validate Table References.
Results
Validation errors are shown in the SQL and XQuery editor marker bar.

Feedback