Subselect indetation

2 Posts
2 Users
0 Reactions
33 Views
(@kmpel)
Member
Joined: 3 months ago
Posts: 13
Topic starter  

Hi Guido, is it possible to control the indentation of subselects? It's immediately after the comma.

If the subselect is aligned with column names, it's more difficult to read, especially for longer select clauses and longer subselects. Is it possible to have any of the suggested indentations below, please?

SELECT
    LocalAmount       = @AmountOnAccount
   ,LocalCurrencyCode =
                        (
                            SELECT a.CurrencyCode FROM Treasure.Account a WHERE a.AccountId = @AccountId
                        )

/* SUGGESTED BEHAVIOUR
SELECT
    LocalAmount       = @AmountOnAccount
    --option1: after equal sign
   ,LocalCurrencyCode =
                        (
                            SELECT a.CurrencyCode FROM Treasure.Account a WHERE a.AccountId = @AccountId
                        )

SELECT
    LocalAmount       = @AmountOnAccount
    --option2 indented
   ,LocalCurrencyCode =
        (
            SELECT a.CurrencyCode FROM Treasure.Account a WHERE a.AccountId = @AccountId
        )

*/

 



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

Hi @kmpel,

please try these settings. It is not exactly what you suggested but is going in your direction

grafik


   
ReplyQuote
Share: