SQL Server - DECLARE and commas

4 Posts
2 Users
0 Likes
159 Views
(@tix2garr)
Member
Joined: 2 years ago
Posts: 2
Topic starter  

I'm currently using 6.24.4.1 in Notepad++ and 6.24.03.30 (GUI)/6.24.03.22 (engine release) desktop version and they are both doing the same thing.

Prior to the last update or so, my DECLARE statement would look like:

DECLARE @SQL VARCHAR( MAX ) = ''
   , @SQL2 VARCHAR( MAX ) = ''
   , @Type VARCHAR( 6 ) = 'F0004'
   , @LinkToTable NVARCHAR( 150 ) = 'Something'
   , @LinkToColumn NVARCHAR( 150 ) = 'Something else'
   , @LinkValue NVARCHAR( 150 ) = ''
   , @Start VARCHAR( 2 ) = '6'
   , @NumChars VARCHAR( 2 ) = '6'
    

Line break before comma.

 

Now, however, it is doing this:

DECLARE @SQL VARCHAR ( MAX ) = ''                   ,
   @SQL2 VARCHAR ( MAX ) = ''                       ,
   @Type VARCHAR ( 6 ) = 'F0004'                    ,
   @LinkToTable NVARCHAR ( 150 ) = 'Something'      ,
   @LinkToColumn NVARCHAR ( 150 ) = 'Something else',
   @LinkValue NVARCHAR ( 150 ) = ''                 ,
   @Start VARCHAR ( 2 ) = '6'                       ,
   @NumChars VARCHAR ( 2 ) = '6'
 

I can't find any settings for DECLARE to "fix" it.  Everywhere I can find, I have line break before the comma.

Help, please.  🙂

Michael


   
Quote
Guido
(@admin)
Member Admin
Joined: 2 years ago
Posts: 175
 

Dear @tix2garr,

thanks for your feedback. I will investigate

Regards

Guido


   
ReplyQuote
Guido
(@admin)
Member Admin
Joined: 2 years ago
Posts: 175
 

I found the reason for this issue.

Until now I used this option (see screenshot) to control linebreaks before/after comma for Commands like the EXEC.

grafik

Now this option is only impacting linebreaks for Parms as it is said in the Panel

I will need to add another option to control linebreak for statements

 

 


   
ReplyQuote
(@tix2garr)
Member
Joined: 2 years ago
Posts: 2
Topic starter  

I would very much appreciate that.  🙂

Interesting side note, though...  no matter what I have checked, or not checked, in the Before Comma and After Comma checkboxes, it doesn't affect the commas in the declare statement.  Wacky.  <wry smile>

Michael

This post was modified 1 week ago by Tix2garr

   
ReplyQuote
Share: