Home All Groups Group Topic Archive Search About

Management Studio: Fatal Scripting Error

Author
3 Apr 2006 7:28 PM
Dr. Network
I'm trying to add more than one view to my database in a script. While the view in my scripts are different than the example below, it illustrates the problem. Essentially, when I try to add more than one view, I'm getting a parsing error on the word "GO". The script works OK in SQL 2000 Query Analyzer but fails in Management Studio. I've installed the SQL 2005 Service Pack 1 CTP on my Windows XP SP2 workstation. When I run only the top or bottom portion of the view, the respective view script parses and runs.

Here is the script:
CREATE view [dbo].[Object_View] as

select * from sysobjects where name = 'sysobjects'

GO

CREATE view [dbo].[Column_View] as

select * from table_detail where name = 'syscolumns'

GO

Here is the error:

A fatal scripting error occurred.

Incorrect syntax was encountered while parsing GO.

Author
3 Apr 2006 8:00 PM
Dr. Network
I found the problem. I was using an old script that had been set up for both Oracle and SQL Server to generate the views from metadata. The scripts were generating a CHAR(13) for carriage return without a CHAR(10) for line feed. This caused an error in Management Studio - but curiously not in Query Analyzer.

Is anybody else finding little idiosyncrasies in this that make Query Analyzer look still good? There are some things I really like in Management Studio but things like this drive me crazy. I really don't like that I can't script the DROP and PERMISSIONS when I script an object - at least I haven't found the configuration yet.

Chuck Hawkins
  "Dr. Network" <charles.hawk***@jenzabar.net> wrote in message news:%23CIX4S1VGHA.5100@TK2MSFTNGP11.phx.gbl...
  I'm trying to add more than one view to my database in a script. While the view in my scripts are different than the example below, it illustrates the problem. Essentially, when I try to add more than one view, I'm getting a parsing error on the word "GO". The script works OK in SQL 2000 Query Analyzer but fails in Management Studio. I've installed the SQL 2005 Service Pack 1 CTP on my Windows XP SP2 workstation. When I run only the top or bottom portion of the view, the respective view script parses and runs.

  Here is the script:
  CREATE view [dbo].[Object_View] as

  select * from sysobjects where name = 'sysobjects'

  GO

  CREATE view [dbo].[Column_View] as

  select * from table_detail where name = 'syscolumns'

  GO

  Here is the error:

  A fatal scripting error occurred.

  Incorrect syntax was encountered while parsing GO.
Author
3 Apr 2006 8:06 PM
Dr. Network
This was addressed in Bug ID FDBK44155.

Chuck Hawkins
  "Dr. Network" <charles.hawk***@jenzabar.net> wrote in message news:ucmK$k1VGHA.5592@TK2MSFTNGP09.phx.gbl...
  I found the problem. I was using an old script that had been set up for both Oracle and SQL Server to generate the views from metadata. The scripts were generating a CHAR(13) for carriage return without a CHAR(10) for line feed. This caused an error in Management Studio - but curiously not in Query Analyzer.

  Is anybody else finding little idiosyncrasies in this that make Query Analyzer look still good? There are some things I really like in Management Studio but things like this drive me crazy. I really don't like that I can't script the DROP and PERMISSIONS when I script an object - at least I haven't found the configuration yet.

  Chuck Hawkins
    "Dr. Network" <charles.hawk***@jenzabar.net> wrote in message news:%23CIX4S1VGHA.5100@TK2MSFTNGP11.phx.gbl...
    I'm trying to add more than one view to my database in a script. While the view in my scripts are different than the example below, it illustrates the problem. Essentially, when I try to add more than one view, I'm getting a parsing error on the word "GO". The script works OK in SQL 2000 Query Analyzer but fails in Management Studio. I've installed the SQL 2005 Service Pack 1 CTP on my Windows XP SP2 workstation. When I run only the top or bottom portion of the view, the respective view script parses and runs.

    Here is the script:
    CREATE view [dbo].[Object_View] as

    select * from sysobjects where name = 'sysobjects'

    GO

    CREATE view [dbo].[Column_View] as

    select * from table_detail where name = 'syscolumns'

    GO

    Here is the error:

    A fatal scripting error occurred.

    Incorrect syntax was encountered while parsing GO.

AddThis Social Bookmark Button