Unwanted Names Capitalisation

5 Posts
2 Users
1 Reactions
45 Views
(@kmpel)
Member
Joined: 3 months ago
Posts: 13
Topic starter  

Hi, I observe that in some cases formatter changes the capitalisation of some names. Please see below three samples of these changes. Thank you for your help.

cases:

  1. SELECT (@Variable)
  2. Variable declaration  as a table
  3. Cursor declaration

 

DECLARE @TopCount INT = 300

--changing variable name @TopCount to capitals in select top clause
SELECT TOP (@TOPCOUNT) JournalId = jr.JournalId
    ,CategoryId                  = jr.CategoryId
    ,AccountTransactionId        = jr.AccountTransactionId
    ,ExpenseTransactionId        = jr.ExpenseTransactionId
FROM schema.table jr

--changing variable @PeriodJournalDateList as table name to capitals in declare clause
DECLARE @PERIODJOURNALDATELIST TABLE (JournalDate DATE)

--changing cursor test_cur name to capitals
DECLARE TEST_CUR CURSOR FOR
OPEN test_cur INTO @aaa
DEALLOCATE test_cur

/*-----------------------------------------------
Expected behaviour:

DECLARE @TopCount INT = 300

--changing variable name @TopCount to capitals in select top clause
SELECT TOP (@TopCount) JournalId = jr.JournalId
    ,CategoryId                  = jr.CategoryId
    ,AccountTransactionId        = jr.AccountTransactionId
    ,ExpenseTransactionId        = jr.ExpenseTransactionId
FROM schema.table jr

--changing variable @PeriodJournalDateList as table name to capitals in declare clause
DECLARE @PeriodJournalDateList TABLE (JournalDate DATE)

--changing cursor test_cur name to capitals
DECLARE test_cur CURSOR FOR
OPEN test_cur INTO @aaa
DEALLOCATE test_cur
-----------------------------------------------*/


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

Hi @kmpel,

thanks for this one.This is a BUG. I found the issue and will fix this asap

Regards

Guido



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

I fixed it in my test environment. Will need to do more tests tomorrow. For now it looks good and will probably publish it tomorrow 🙂



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

H @kmpel,

the new SSMS22 Release 26.1.26 is ready for download.

Regards

Guido



   
ReplyQuote
(@kmpel)
Member
Joined: 3 months ago
Posts: 13
Topic starter  

COOL, it's working! 👍



   
ReplyQuote
Share: