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?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • 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