Search code examples
sybaseoracle-sqldevelopersap-ase

incorrect syntax near go


I used to write this on top of any create procedure statement. It worked fine when executed from either python sybase lib; c++ sybase lib, or Toad for sybase.

However since I started using "oracle sql developper" it is not working anymore. I get "incorrect syntax near go".

I can execute separately ( the below and the create procedure ) but not execute without the go, otherwise I get "create procedure statement must be the first statement of a batch"

IF EXISTS 
(
        SELECT 1 
        FROM sysobjects 
        WHERE type = 'P' and name = 'proc_name' 
)

BEGIN
        DROP PROCEDURE proc_name 
END

GO

I cannot use toad as I am working with control freaks admin. I'm not local admin, I cannot install software the tools used are dictated by management.

Do you have any idea ?


Solution

  • This appears to be an issue related to SQLDeveloper.

    REPLACE each GO by / and it runs.