How can we help you today? How can we help you today?

Bug: Minor error formatting CTE

Not sure if this is the venue to report bugs, but I've run across an odd one.

Here's my query:
PRINT 'Why is comment moved?';

--Here is my comment
;WITH cteBar
AS (SELECT *
    FROM myTable
   )
SELECT *
FROM cteBar

That semicolon at the end of my print statement causes the format engine to add some lines between my comment and the CTE. Take away the semicolon and it works pretty good. (Although it still puts the semicolon before WITH on a separate line.)
JonBrune
0

Comments

1 comment

  • Michael Clark
    Hi Jon,

    I've managed to reproduce your bug on my machine so we've logged a bug under reference SP-6429.

    Thanks for reporting! We'll let you know if we find a fix.

    Best,
    Michael
    Michael Clark
    0

Add comment

Please sign in to leave a comment.