Preserve lines between clauses in Format SQL style

yjayyjay Posts: 1 New member
I'm trying to recreate the following style in SQL Prompt and have not been successful in preserving the lines between clauses nor the number of tabs after the keyword. Any ideas on how to edit a style for this?

Answers

  • Hi @yjay

     Thank you for reaching out on the Redgate forums, I've been attempting to recreate this style also and have some areas that may assist in your pursuit.

    For the spacing - I believe you may want to look at the New lines section within the Format Editor > Global > Whitespace section

    Enabling both the 'preserve existing empty lines' options.

    This won't add in blank lines but will preserve any that are entered whilst writing your code.

    I don't believe there is a way to add empty lines into the middle of a statement except by manual entry.

     You can also disable the 'preserve existing empty lines between statements' setting and use that to define custom spacing between statements, and then keep the spacing within statements set to manual.

     

    Hope this is of help with your formatting goals.

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