Error when formatting in SQLCMD mode

JonBruneJonBrune Posts: 10 New member
SQL Prompt is changing this:
:SETVAR MyVar      "Foo"

-- SQL Prompt formatting off
INSERT INTO #MyTable
(
    Col1
)
VALUES
 ('1')
-- SQL Prompt formatting on
into:
:SETVAR MyVar      "Foo":SETVAR MyVar      "Foo"-- SQL Prompt formatting off
INSERT INTO #MyTable
(
    Col1
)
VALUES
 ('1')
-- SQL Prompt formatting on
I'd like to submit a bug for this but it looks like the options are ask a question or start a discussion.  Maybe bugs are to be submitted elsewhere?


Best Answers

  • Alex BAlex B Posts: 713 Diamond 1
    Accepted Answer
    Hi @JonBrune,

    I see this happening as well - it seems specifically related to "-- SQL Prompt formatting off" comment following the :Setvar.  I have raised this with the team as SP-7591 and will update you when I have further information from the team.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Alex BAlex B Posts: 713 Diamond 1
    Accepted Answer
    Hi @JonBrune,

    The team has released SQL Prompt v9.5.4 which fixes this issue.  Please update to the latest version (download here) and confirm that it has corrected the issue for yourself as well!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Answers

Sign In or Register to comment.