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.)
Here's my query:
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.)