• Now this one still bothers me...

    Why does it execute the no part after the 8125 error?

    By the way, it only executes it with the following SET options:

    SET XACT_ABORT OFF

    SET ANSI_WARNINGS ON

    Funny enough, one would think that if the warnings are on, the error would stop execution, but instead you need to turn warnings off to make SQL Server stop the execution. And unfortunately BOL does not really assist in understanding this.

    At least the XACT_ABORT setting makes some kind of sense with regards to the error.

    Best Regards,

    Chris Büttner