INDENT BACK FOR BEGIN AND END

4 Posts
2 Users
1 Reactions
108 Views
 Muj
(@muj)
Member
Joined: 2 months ago
Posts: 2
Topic starter  

Hello,

I'm not being able to figure out how to INDENT BACK 4 spaces, when using BEGIN and END. For example, my code usually ends up like:

BEGIN
     IF @@rowcount = 0
     BEGIN RETURN;

     END;  -- The END here works as expected and aligns with the Begin.

     SET NOCOUNT ON;

     UPDATE dbo.table
     SET [stuff I want to set]
     FROM dbo.table t
     INNER JOIN inserted i
     ON t.id = i.id;

     END; -- The END here doesn't work as expected and doesn't aligns with the Begin.

 

Help? I tried searching the Forum for this, but either it wasn't brought up before or my search didn't work properly.

Thanks!



   
Quote
Guido
(@admin)
Member Admin
Joined: 4 years ago
Posts: 284
 

Ho @muj,

thanks for your feedback. Which DB are you working with? Are you working with the N++ Plugin?

Regards

Guido



   
ReplyQuote
 Muj
(@muj)
Member
Joined: 2 months ago
Posts: 2
Topic starter  

I'm working with SQL Server Management Studio 20.2.1. Yes, I believe so. It looks like this:

image


   
ReplyQuote
Guido
(@admin)
Member Admin
Joined: 4 years ago
Posts: 284
 

Please install the latest Release. it formats as follows

grafik


   
Muj reacted
ReplyQuote
Share: