How do I configure after "WHERE (" and aligning "ON"? in a sub select?

8 Posts
2 Users
0 Reactions
62 Views
(@itsnota2ma)
Member
Joined: 1 month ago
Posts: 5
Topic starter   [#156]

You can see from my sample below, I do not want a new line after "WHERE(" and I do not want "ON" to align. I also noticed the SELECT fields do not align in the sub select. Is this configurable??

LEFT OUTER JOIN ( SELECT ModuleID,
              UserDefined3,
              OwnerID
         FROM AdditionalInfo AS AdditionalInfo_2
        WHERE(
                 ModuleID = 12) ) AS Finish ON Items.ItemID = Finish.OwnerID
LEFT OUTER JOIN InventoryTracking           ON Items.InventoryTrackingID = InventoryTracking.InventoryTrackingID
LEFT OUTER JOIN Categories                  ON Items.CategoryID = Categories.CategoryID

It should look like this:

LEFT OUTER JOIN (SELECT ModuleID,
                        UserDefined3,
                        OwnerID
                 FROM AdditionalInfo AS AdditionalInfo_2
                 WHERE(ModuleID = 12) 
                 ) AS Finish ON Items.ItemID = Finish.OwnerID
LEFT OUTER JOIN InventoryTracking ON Items.InventoryTrackingID = InventoryTracking.InventoryTrackingID
LEFT OUTER JOIN Categories ON Items.CategoryID = Categories.CategoryID


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

Hi @itsnota2ma,

Question 1:you can avoid a new line after "WHERE(" be unchecking the linebreaks for condition brackets 

grafik

Question 2: You cannot avoid the alignment of the on if the "on" has no linebreak before

Question 3: here you have 2 options
Option 1: put a linebreak after the sub-select open bracket and the SELECT will be moved to its correct position

grafik

Option2 (recommended): In the new Release there is a new option for Sub-selects called "Align Sub-Select to Open Bracket"

grafik

Hope this helps



   
ReplyQuote
(@itsnota2ma)
Member
Joined: 1 month ago
Posts: 5
Topic starter  

Well, this explains a few things. I do not have those options and when I open from SSMS, this is what I get. And I just installed the latest version for SSMS 22. I was pointing to the old desktop version. I see the plugin in SSMS, which does not have those options, and I cannot find the executable for the desktop version once I removed the SSMS 21 version.

image


   
ReplyQuote
(@itsnota2ma)
Member
Joined: 1 month ago
Posts: 5
Topic starter  

Okay, I just downloaded the Portable App and I see the changes I can make.



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

Hi @itsnota2ma,

in the ssms plugin there is a tab for subselect options and a tab for Condition Options

grafik


   
ReplyQuote
(@itsnota2ma)
Member
Joined: 1 month ago
Posts: 5
Topic starter  

Guido,

Where are the profiles stored for the SSMS plugin? Can it be changed?

Thanks,

Mike



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

Hi MIke, the Team Folder Location can be changed into a shared folder for the whole team

grafik


   
ReplyQuote
(@itsnota2ma)
Member
Joined: 1 month ago
Posts: 5
Topic starter  

@admin Thank you! I had assumed that was for Team licenses only.



   
ReplyQuote
Share: