Microsoft KB Archive/201545

= BUG: Stored Procedure Names Starting with 'go' Cause Syntax Errors =

Article ID: 201545

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q201545



BUG #: 53819 (SQLBUG_70)



SYMPTOMS
Stored Procedure names that start with the letters 'go' are treated by the Query Analyzer (ISQLW.EXE) utility as an action statement. Execution of such stored procedures may fail with the following error message:

Server: Msg 2812, Level 16, State 62, Line 1

Could not find stored procedure 'XXX'.

The stored procedure name listed in the message will be the name of the procedure without the first two letters 'go'.



CAUSE
SQL Server query utilities use the keyword 'go' as the default delimiter for a batch of TSQL commands. The utility submits incorrect commands to the SQL Server. In the example, when calling a procedure name 'got_entries' from Query Analyzer, the query submitted to SQL Server is 't_entries' not 'got_entries'.

The GUI query utility sees the 'go' pattern as the standard action in a Transact-SQL (TSQL) sequence.



WORKAROUND
To workaround this problem, you can either:  Change the name of the stored procedure to avoid starting with 'go'.

-or- Use the ISQL.exe or OSQL.exe command line utilities.

-or-  Adjust your default 'TSQL Batch Separator' option:     In the Query Analyzer, from the Query menu, choose Current Connection Options and set the 'TSQL Batch Separator' to something other than 'go' 



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.



MORE INFORMATION
Here is an example of the error: create procedure got_entries as print 'Hello' go got_entries go RESULT: The following error occurs:

Server: Msg 2812, Level 16, State 62, Line 1

Could not find stored procedure 't_entries'.

Keywords: kbbug kbpending KB201545

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.