Formatting style: Indenting subqueries question

BogBog Posts: 5 Bronze 1
edited February 2, 2021 10:44PM in SQL Prompt
Hello,

Currently, when I format my query, the exists subquery is not left aligned with the And operator. Is there a setting to force it align with the AND keyword?


I scoured through all the settings and I didn't find anything, but maybe I missed it.

And one more thing, I noticed that after I made Formatting style changes and saved them, I had to restart SSMS to make them effective. Is it normal? Imo, the changes should be effective immediately.

Thanks




Tagged:

Answers

  • Hi @Bog

    Thanks for reaching out to us regarding this.

    Are you able to achieve the formatting you are after using the AND/OR operator settings shown in the screenshot below?



    Regarding having to restart SSMS are formatting style changes, this shouldn't be necessary. What version of SQL Prompt are you currently using?



    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
  • BogBog Posts: 5 Bronze 1
    Hi @Dan_J,

    Firstly, I upgraded to 10.6.1 yesterday.

    re: formatting subqueries - that's what I use and the subqueries are not aligned properly. I just tried again and the subquery is aligned with the WHERE keyword in the query. Imo, it should be aligned with the AND operator or perhaps indented with one step.

    re: saving the formatting style changes - they fixed the issue in 10.6.1. So it's all good.
  • Hi @Bog

    My sincere apology for the delay in responding to you regarding this!

    So that I can best troubleshoot this, would you be happy to provide me with a copy of your script and format style file?


    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.