Subselect indetation

2 Posts
2 Users
0 Reactions
456 Views
Posts: 13
Topic starter
(@kmpel)
Member
Joined: 7 months ago
[#153]

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
        )

*/

 


1 Reply
Guido
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

Hi @kmpel,

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

grafik

Reply
Share: