Syntax Checker
Go Up to Using Query Builder
The Syntax Checker scans SQL statements for errors. You can check your syntax at any time while you are fashioning a query, or a Procedure or Function. Query Builder can automatically run a syntax check to validate your query when you are executing or copying a statement. The options for the Syntax Checker tool are set in the Options Editor. For details,see Query Builder Options.
- Note: Query Builder lets you continue with your query even if there are errors detected in the syntax.
Using the Syntax Checker
The table below describes the possible syntax errors the Query Builder Syntax Checker tool displays, in order:
Error | Description |
---|---|
Does the query contain duplicate aliases? |
Query Builder returns an error message when it detects duplicate aliases. |
If the query has a HAVING clause, is there a GROUP BY clause? |
Query Builder returns an error message when it detects a HAVING clause without a GROUP BY clause. |
If there are aggregates, or a GROUP BY clause, are all columns in one or the other? |
Query Builder returns an error message when it detects an aggregate, or a GROUP BY clause without all columns in one or the other. |
Are there joins against non-indexed columns, or columns not participating in a primary key? |
Query Builder returns a warning when it detects a join against a non-indexed column, or a column not participating in a primary key. |
Are there joins between different datatypes? |
Query Builder returns a warning when it detects a join between different datatypes. |
Are there cross-products in the query? |
Query Builder returns a warning when it detects a cross-product in the query. |