title: incorrect syntax near in creating stored procedure on a remote db
body: <p>I am trying to recreate a stored procedure on a database which is hosted on a remote server.
  When creating the same SP locally I don't get any errors but when I am trying to create the SP on the remote server I am getting this errors:</p>
  
  <pre><code>Msg 102, Level 15, State 1, Procedure MySP, Line 26
  Incorrect syntax near 'MERGE'.
  Msg 102, Level 15, State 1, Procedure MySP, Line 27
  Incorrect syntax near 'S'.
  </code></pre>
  
  <p>Those errors are repeating in multiple SP and I didn't get them when I created the SP's on my local server.
  Any idea what can that be?
  Here is a sample SP:</p>
  
  <pre><code>USE [MyDatabase]
  GO
  /****** Object:  StoredProcedure [dbo].[InsertContractorInfo]    Script Date: 11/07/2012 01:08:31 ******/
  SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  -- =============================================
  -- Author:      &lt;Author,,Name&gt;
  -- Create date: &lt;Create Date,,&gt;
  -- Description: &lt;Description,,&gt;
  -- =============================================
  --exec [dbo].[InsertContractorInfo] 
  CREATE PROCEDURE [dbo].[InsertContractorInfo]
  (@CompanyName nvarchar(50), 
   @LicenseNumber nvarchar(50),
   @MailingAddress1 nvarchar(200),
   @MailingAddress2 nvarchar(200),
   @Phone nvarchar(10),
   @Fax nvarchar(10),
   @Mobile nvarchar(10),
   @Email nvarchar(200),
   @PercentCommercial int,
   @PercentResidental int,
   @TotalEmployees int,
   @AnnualSales decimal(18,2),
   @InsuranceCompanyContact nvarchar(100)=null,
   @InsuranceCompanyContactEmail nvarchar(100)=null,
   @InsuranceCompanyContactPhone nvarchar(100)=null,
   @ContractorID uniqueidentifier)
  AS
  BEGIN
  MERGE dbo.Contractor con
  USING(SELECT 1 S) S
  ON con.Oid = @ContractorID
  WHEN MATCHED THEN UPDATE 
     SET       
        [CompanyName] = @CompanyName      
        ,[LicenseNumber] = @LicenseNumber
        ,[MailingAddress1] = @MailingAddress1
        ,[MailingAddress2] = @MailingAddress2
        ,[Phone] = @Phone
        ,[Fax] = @Fax
        ,[EMail] =@Email
        ,[Mobile] =@Mobile      
        ,[PercentCommercial] = @PercentCommercial
        ,[PercentResidental] = @PercentResidental
        ,[TotalEmployees] = @TotalEmployees
        ,[ApproximateAnnualSales] = @AnnualSales      
        ,[InsuranceCompanyContact] = @InsuranceCompanyContact
        ,[InsuranceCompanyContactPhone] = @InsuranceCompanyContactPhone
        ,[InsuranceCompanyContactEmail] = @InsuranceCompanyContactEmail      
  WHEN NOT MATCHED THEN
  INSERT 
             ([Oid]       
             ,[CompanyName]           
             ,[LicenseNumber]
             ,[MailingAddress1]
             ,[MailingAddress2]
             ,[Phone]
             ,[Fax]
             ,[EMail]
             ,[Mobile]                      
             ,[PercentCommercial]
             ,[PercentResidental]
             ,[TotalEmployees]
             ,[ApproximateAnnualSales]                      
             ,[InsuranceCompanyContact]
             ,[InsuranceCompanyContactPhone]
             ,[InsuranceCompanyContactEmail])
       VALUES
             (@ContractorId           
             ,@CompanyName           
             ,@LicenseNumber
             ,@MailingAddress1
             ,@MailingAddress2
             ,@Phone
             ,@Fax
             ,@EMail
             ,@Mobile
             ,@PercentCommercial
             ,@PercentResidental
             ,@TotalEmployees
             ,@AnnualSales                     
             ,@InsuranceCompanyContact
             ,@InsuranceCompanyContactPhone
             ,@InsuranceCompanyContactEmail
             );
  END
  GO
  </code></pre>
  
  <p>Thanks, Laziale</p>