suggestions for AND/OR indent

7 Posts
3 Users
2 Likes
117 Views
 Zero
(@zero)
Member
Joined: 5 months ago
Posts: 11
Topic starter  

Hi, I have  a suggestion for adding a "indent AND/OR in AND/OR condition" option, please and the features if you agree with it, thanks

Example:

-- origin code:

select * from tables
where 1=1 and (2=2 or (3=3 and 4=4 and 5=5))

;

-- now formatted:

SELECT
       *
  FROM TABLES
 WHERE 1 = 1
       AND(2 = 2
       OR(3  = 3
       AND 4 = 4
       AND 5 = 5 ) )

;

-- hope: add a "indent AND/OR in AND/OR condition" option

SELECT
       *
  FROM TABLES
 WHERE 1 = 1
       AND(2 = 2
           OR(3  = 3
              AND 4 = 4
              AND 5 = 5 ) )

   
Guido reacted
Quote
(@benjamin-moeller)
Member
Joined: 2 years ago
Posts: 17
 

Hallo Zero
this is possible:

image

   
Guido reacted
ReplyQuote
 Zero
(@zero)
Member
Joined: 5 months ago
Posts: 11
Topic starter  

Hello, thanks for your reply.

Follow the setting in my vscode with plugin v2.0.60, It seems don't work

image

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

Hello @zero, thanks for your reply.

Are you working with the free or pro Version of VSCode Plugin?

This is what I get in VSCode

grafik

Regards

Guido

This post was modified 4 weeks ago by Guido

   
ReplyQuote
 Zero
(@zero)
Member
Joined: 5 months ago
Posts: 11
Topic starter  

Hi @admin , In my VSCode(1.88.0) with Plugin(v2.0.60) and  pro Version, I get this:

image

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

Could you please send me the results of this command via mail to info@sqlinform.com

grafik

   
ReplyQuote
 Zero
(@zero)
Member
Joined: 5 months ago
Posts: 11
Topic starter  

@admin I have send you the file, please check your mailbox, thanks


   
ReplyQuote
Share: