Working with unsupported or invalid code in the SQL Builder
The SQL Builder supports saving and loading unrecognized syntax. When the parser encounters unrecognized syntax, parts of the SQL Builder become unavailable. After you have fixed the syntax, all parts are available again. You have various options to fix the syntax, including reverting to the last known proper source and fixing the code manually.
Note: There is one scenario where all parts of the SQL Builder remain available when the statement is incorrect. This is when the statement is the default statement.
To work with unsupported or invalid SQL code in the SQL Builder:
- Create or open an SQL statement in the SQL Builder that contains unsupported or invalid code, and save the statement. A Validation Failed message is displayed, and all sections of the SQL Builder except the SQL Source pane become unavailable.
- To fix the unsupported code manually, delete it and save the statement. All sections of the SQL Builder are available again.
- To revert to the last correct known source, right-click in the SQL Source pane, and then click Revert to Last Correct Source on the pop-up menu.
If you select to revert to your last known source, all sections of the SQL Builder are available again.
- A window containing the last correct known source opens.
- Click OK to revert to this source or Cancel to keep your current source.
- To clear to skeleton code (that is, the minimum amount of code that is valid) for the statement, right-click in the SQL Source pane and then click Clear to Skeleton on the pop-up menu. For this option, the default statement for the current statement type is used. For example, a SELECT statement has the default statement 'SELECT *'.
After you have made your code valid, you can save it and close the statement.
Parent topic
SQL Builder