Formatting EXISTS after WHERE

2 Posts
2 Users
0 Reactions
843 Views
Posts: 8
Topic starter
(@lamprey)
Member
Joined: 4 years ago
[#55]

In my settings I have Linebreak set on "Select\After Where" checked. Which seems to work except when there is an EXISTS clause immediately following the WHERE. I expected the EXITS to be on a newline.

For example:

select
    foo
from
    dbo.tablename
where exists
    (
        select
            1
        from
            dbo.tablename2
    )

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

Hi Lamprey,

the parser considers "WHERE EXISTS" and "WHERE NOT EXISTS" as a group of tokens which belong to the same keyword. Therefore there is no linebreak inserted inside a group of tokens which belong to the same keyword

Regards

Guido


Reply
Share: