I don't know if this is a bug, or if this is a feature request. This is not a new bug/feature--it's been around for a while, I'm just getting around to mentioning it.
If you paste in the following snip into a SSMS tab and run Format SQL, the single line comment will stay in place (as it should)
Use AdventureWorks
Go
Select *
From Person.Contact As c
Where c.ContactID > 0 -- This comment will stay where it belongs after Format SQL is run.
But, as soon as you add more statements, then running Format SQL will cause the comment to go to the next line. Is there a way to make that STOP?
This code...
Use AdventureWorks
Go
Select *
From Person.Contact As c
Where c.ContactID > 0 -- This comment WILL MOVE to the next line after Format SQL is run.
Select *
From Person.Address As a
Then becomes...
Use AdventureWorks
Go
Select *
From Person.Contact As c
Where c.ContactID > 0
-- This comment WILL MOVE to the next line after Format SQL is run.
Select *
From Person.Address As a
Thanks,
Jim
If you paste in the following snip into a SSMS tab and run Format SQL, the single line comment will stay in place (as it should)
But, as soon as you add more statements, then running Format SQL will cause the comment to go to the next line. Is there a way to make that STOP?
This code...
Then becomes...
Thanks,
Jim