facebook

Scripting stored proc:Incorrect syntax near ‘GO’

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #251525 Reply

    We use scripts to drop and recreate our stored procedures like below. When I execute this script from within the Database Explorer perspective I get an error saying “Incorrect syntax near ‘GO'”. Is there a way to execute these scripts from within the DB perspective?
    Thanks!

    SET QUOTED_IDENTIFIER OFF
    SET ANSI_NULLS ON
    GO
    
    IF    EXISTS
        (SELECT    *
           FROM    dbo.SYSOBJECTS
          WHERE    [Id] = OBJECT_ID(N'[dbo].[usp_CMEstimateDetail]') AND
            OBJECTPROPERTY([Id], N'IsProcedure') = 1)
        DROP    PROCEDURE [dbo].[usp_CMEstimateDetail]
    GO

    CREATE PROCEDURE dbo.usp_CMEstimateDetail (
    @CMActivityId INT,
    @argUserRefId INT
    ) AS

    #251544 Reply

    Haris Peco
    Member

    jicenhower ,

    You can try with ; instead GO, but you have remove ‘set’ commands – set is special for your client and it isn’t part of sql

    We will support MSSQL/Syabse procedure better in future releases

    best regards

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Scripting stored proc:Incorrect syntax near ‘GO’

You must be logged in to post in the forum log in