compiler error in this script

  • Hello,

    I have a database script posted below. In Visual Studio it *sometimes* gives me a compile error on the line: :r .\Seed_EncanaProjectTemplate.sql

    It's specifically the leading : that's underlined in red.

    This only sometimes gets caught in compilation, sometimes not.

    Can anybody see why that might be an issue?

  • junk.mail291276 - Thursday, January 19, 2017 2:05 PM

    Hello,

    I have a database script posted below. In Visual Studio it *sometimes* gives me a compile error on the line: :r .\Seed_EncanaProjectTemplate.sql

    It's specifically the leading : that's underlined in red.

    This only sometimes gets caught in compilation, sometimes not.

    Can anybody see why that might be an issue?

    Did you switch to SQLCMD mode in VS?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Phil Parkin - Thursday, January 19, 2017 2:23 PM

    junk.mail291276 - Thursday, January 19, 2017 2:05 PM

    Hello,

    I have a database script posted below. In Visual Studio it *sometimes* gives me a compile error on the line: :r .\Seed_EncanaProjectTemplate.sql

    It's specifically the leading : that's underlined in red.

    This only sometimes gets caught in compilation, sometimes not.

    Can anybody see why that might be an issue?

    Did you switch to SQLCMD mode in VS?

    That helped. Turning on SQLCMD mode made the red squiggly underline go away and everything compiles properly.

    Thanks.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply