Andre,
I could not reproduce it today. Instead, it is doing something even more strange. Here's the original code:
USE [MyDatabase];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
ALTER PROCEDURE dbo.foo
AS
/*
This is a test comment.
*/
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL SNAPSHOT;
WITH /dbo.foo/
foo1 AS (
SELECT DISTINCT id
FROM dbo.bar
)
SELECT bar
INTO #MyTemp
FROM bar;
SELECT /dbo.foo/
bar
FROM #MyTemp;
TRUNCATE TABLE #MyTemp;
GO
After I click the Format button, it pulls the "AS" up to the "ALTER" line and indents everything below it until it hits the "TRUNCATE" line, which it leaves at the left margin. If I click the Format button again, it indents the comment line and the line with the closing comment characters by one indent, leaving everything else alone. Every time I click Format, it indents just those two lines by one more indent increment.
252
5.266.0
5.267
4
1
4
1
1
1
132
<LF_ConsecLFLimit>2</LF_ConsecLFLimit>
0
0
1
2
1
0
1
0
1
2
0
4
4
4
D
6
D
6
4
4
4
2
0
0
Mark Freeman
Database Administrator | R****ogue Fitness
1080 Steelwood Road, Columbus, OH 43212
MFreeman@RogueFitness.com
On Sat, Jan 3, 2015 at 2:40 PM, Andre Vergison bounce-avergison@toadworld.com wrote:
RE: Formatter: Comment block start being moved to end of previous line
Reply by Andre Vergison
Hello. I could not reproduce it, it seems to format normally here. Could you please paste here the formatter option values you're using? Go to the top pane of the options tree (the one labeled "Sql Server Formatter Options"), then click on Copy Options, and paste it here.
Also, is there any SQL code preceding or following this snippet that you think influences the result?
Thanks,
Andre
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or Unsubscribe from Toad for SQL Server - General notifications altogether.
Toad for SQL Server - Discussion Forum
Flag this post as spam/abuse.
![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)