Hi everyone, I'm having some trouble with the following statement. I'm getting an incorrect syntax near 'OFF' at line 3 and also at the 'END' portion at the bottom. I'm guessing it has to do something with the 'GO' keyword but if I were to remove them, I'd then have issues with the create procedure statement. Does anyone have an idea of how to work around this?IF 1 = 1BEGIN SET NUMERIC_ROUNDABORT OFF GO SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON GO IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors CREATE TABLE #tmpErrors (Error int) GO SET XACT_ABORT ON GO SET TRANSACTION ISOLATION LEVEL SERIALIZABLE GO -- ============================================= -- Description: Test proc -- ============================================= CREATE PROCEDURE [dbo].[TestProc] AS BEGIN SELECT 1 END GO IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION GO IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION GO DROP TABLE #tmpErrors END