PRSQL9012028: ISQL Interprets Label as GO Command

ID Number: Q67934

1.10

OS/2

buglist1.10

Summary:

PROBLEM ID: PRSQL9012028

SYMPTOMS

The following script run from ISQL

1> select 1

2> goto good

3> select 2

4> good:

5> select 3

6> go

results in the following error message:

MSG 101, Level 15, State 1:

Line 4: SQL syntax error.

MSG 133, Level 15, State 1:

A goto statement references the label 'good' but the label

has not been declared.

CAUSE

Transact-SQL labels that begin with the letters "go", and start in

column 1, are interpreted as the GO command.

RESOLUTION

Enter at least one space on the command line before the label, or

change the name of the label so that it does not start with the

letters "go".

Microsoft has confirmed this to be a problem with SQL Server

version 1.1. Microsoft is researching this problem and will post

new information here as it becomes available.