A few notes when making scripts that create indexes based if they do (not) exist (yet):
- when recreating indexes, use with autonomous transaction as shown in http://stackoverflow.com/questions/12117206/how-do-i-make-a-repeatable-index-script/12121998#12121998
- If you screw up the execute statement part, then the error Firebird returns has a line/column is relative to the opening quote of the execute statement string (that quote is at column zero and line one).
- If you screw up the execute block part, then the error line/column is relative to the word execute (it has column 1 and line 1).
- Don’t forget the set term parts to choose a terminator other than the default semicolon (most people use !! or ^ or # as the new terminator) and revert back to the normal semicolon terminator.
–jeroen





