Execution of statements after errors occur

When a statement returns an error with a severity higher than the value specified for the error level (ERRLVL) parameter of the RUNSQLSTM command, the statement has failed.

Start of changeThe rest of the statements in the source are parsed to check for syntax errors, and will not be run. Most SQL errors have a severity of 30. If you want to continue processing after an SQL statement fails, set the ERRLVL parameter of the RUNSQLSTM command to 30 or higher. DROP statements issue a severity level 20 error if the object is not found to be dropped. Setting the ERRLVL parameter to have a value of 20 allows you to ignore these errors for DROP statements while not allowing processing to continue for other higher severity errors.End of change