• It means you have more than one BEGIN statement and only one COMMIT or END statements. You need to have matching pairs for the query to work correctly.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning