Please look at parenthesis formatting for WHERE EXISTS


I asked this question a few months ago and received no response, so I'm attempting to bring attention to this issue again.

I often use WHERE EXISTS in my SQL, but I'm unable to control how parenthesis format with my preferred parenthesis style Expanded, to statement. I also set Operators Alignment to first list item and Place AND / OR keyword before the condition is checked.

Formatting is tolerable when using two other parenthesis styles Expanded, Simple or Compact, Simple (see samples below), but what I'd really like is to be able to have it with my preferred style.

Is there a way this functionality can be reviewed - or is this something I just need to deal with? I included my format style as well. Thank you.

Here are some samples:

Expanded, Simple
Indent parenthesis contents = checked

Compact, Simple
Indent parenthesis contents = not checked

Expanded, to statement (preferred style - but has parenthesis formatting issue)

Indent parenthesis contents = checked

Expanded, to statement (preferred style - no parenthesis formatting issue)
Indent parenthesis contents = checked



  • Hi @Nikos226,

    What version of SQL Prompt are you using?  I have an option for "Expanded, indented" which formats my sample query exactly as you are looking for:

    You didn't mention this in your other examples, but it looks just like your last "wishlist" example.

    If you do have this option, is there a reason you do not want to use it?

    Kind regards,
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Nikos226Nikos226 Posts: 9 New member
    edited November 8, 2019 3:01PM
    My example is clearly showing broken formatting with EXISTS. Instead of having parenthesis directly under the operator EXISTS, they for formatted to similar to JOIN.

    Sample with this without exists


    You'll notice parenthesis are aligned directly under the AND operator.

    However parenthesis are not aligning directly under the EXISTS operator.

    Yes - your example shows something similar, but this doesn't address the root issue and all parenthesis styles will use this formatting, which is something I'm looking to avoid.

Sign In or Register to comment.