Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7033389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:03:36+00:00 2026-05-28T01:03:36+00:00

I have an auto-generated SQL script with this basic structure: /* */ PRINT ‘Stuff’

  • 0

I have an auto-generated SQL script with this basic structure:

/*
*/
PRINT 'Stuff'
GO
/*
*/
PRINT 'Other stuff'

The problem is that SQL Server doesn’t seem to like block comments when they are placed after a GO. There is a bug for this on Connect (set to won’t-fix, sigh) and a guy named Devi posted some workarounds, but they don’t really work for me because my script is auto-generated.

I can insert something after the GO and before the second block comment. I’ve tried various things in there, however, without changing the failing outcome which, fwiw, is this helpful text:

Msg 102, Level 15, State 1, Line 1 Incorrect syntax near ”.

Is there anything I can stick in between the GO and the comment to avoid this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:03:36+00:00Added an answer on May 28, 2026 at 1:03 am

    Your issue seems to be of a different nature, and two things point to that.

    1. The linked Connect page is about /* ... */ comment after GO on the same line with it, but in your case the comment starts on the line that follows GO.

    2. The issue you are alluding to produces this error message:

      A fatal scripting error occurred.
      Incorrect syntax was encountered while parsing GO.
      

      But yours is different:

      Msg 102, Level 15, State 1, Line 1
      Incorrect syntax near ''.
      

    I’m going to guess here (but not unreasonably, I hope) that your script generator uses Mac style line breaks (0x0D) instead of Windows style ones (0x0D0A). I was able to almost reproduce the issue using Mac line breaks, but in my case the error was just a little bit different from yours:

    Msg 102, Level 15, State 1, Line 1
    Incorrect syntax near 'GO'.
    

    Still it seems close enough for me to suggest you check what kind of line breaks your script generator uses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have .sql files that I'm guessing is auto-generated. I did not generate this
i have my auto-generated linq to sql classes, and i extend this class using
I have a table in a SQL Server database that has an auto-generated integer
What I have: LINQ to SQL auto generated class, which corresponds to the shape
I'm working on databases that have moving tables auto-generated by some obscure tools. By
We have discovered that one of our auto generated assemblies is throwing a StackOverflowException
I have a constructor (for an auto generated class) that has 255 paremeters. Using
I have a domain object that has been auto generated for me by MyGeneration.
I'm accessing a data context object that is auto-generated by using LINQ to SQL.
I have a very large file that creates triggers that I auto generated. However

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.