Align comparison operators doesn't always align

I have SQL Prompt 10.14.21.9884 and I have created my own Style and set Align Comparison Operators = True


However, it doesn't work correctly:


I understand not all subqueries or statements on different levels would align with each other, but comparison operators in the same clause should align, should they not?

This is what the relevant setting looks like in my Style's json:
"operators": {
    "comparison": {
      "align": true
    },
    "andOr": {},
    "between": {
      "placeOnNewLine": false
    },
    "in": {
      "placeFirstValueOnNewLine": "always",
      "addSpaceAroundInContents": true
    }
  }
Tagged:

Answers

  • Hi @OmarSerenity

     

    Thank you for reaching out on the Redgate forums regarding your SQL Prompt formatting concern.

     

    Doing some testing of my SQL Prompt style, I was able to get the comparison operators to align as expected. 

    My initial suspicion is perhaps another spacing setting such as the use of tabs/spaces that is throwing this out.

     

     

     

    I have attached my test style, so you may be able to add it into your Styles folder and see if it formats differently to your style. File - Redgate Test Style.zip

     

    If you would like to provide your style so I can look at it more closely, you can do so via this secure link: https://files.red-gate.com/requests/A5jd2eClqcvU386bSKtqxc

     

     

    I also tested this on V10.16.2. I note that V10.14.21 is a bit older than current releases.. It may also be recommended to patch into a newer version to ensure this wasn't a prior bug that has been resolved since.

    The latest version V10.16.4 can be accessed here:

    https://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_10.16.4.15307.exe

     

    Jon Kirkwood | Technical Support Engineer | Redgate Software
Sign In or Register to comment.