Conditional branching in SQL script
I have a SQL script at the beginning of which is a small PL/SQL block which checks for something and produces the result of the check as e.g. a value in a bind variable.
What I would like to do is exit the script or continue depending on the result of the check.
WHENEVER SQLERROR does not solve it, because the block does not produce any error and even if it did, it would not be a good solution, because the SQL commands that follow
in the script can legally produce errors (well known scenario of dropping and recreating tables).