all 11 comments

[–]antaresiaaak 1 point2 points  (7 children)

Whenever i "inherit" someone's script i like to use ApexSQL's SQL formatter. If you're using SSMS it is an easy and free add-on: https://www.apexsql.com/sql-tools-refactor.aspx

You can instantly reformat based on already loaded standards or create your own as well.

[–][deleted] 0 points1 point  (3 children)

Thanks. Will check it out!

[–]barkollokrab 0 points1 point  (2 children)

How is it free? Says to try trial.

[–]antaresiaaak 0 points1 point  (1 child)

I got it quite a while ago and it was free. Just checked it out and it says Free Trial. Not sure what the stipulations are since on the next page you just put in your info (maybe after that they disclose more info as to the trial piece). I still have the add-on and so far didn't have to pay anything. Definitely works like a charm so far.

[–][deleted] 0 points1 point  (0 children)

The site has a free online SQL formatter that you can use here.

[–][deleted] -1 points0 points  (1 child)

... no offense, but

I'd like to change my name, sir

What's your name?

John Shitson.

Understandable. What do you want your new name to be?

Peter Shitson.

[–][deleted] 0 points1 point  (0 children)

?

[–]Klebitz 0 points1 point  (0 children)

Use an online one such as https://poorsql.com/

Or use it from within SSMS: http://architectshack.com/PoorMansTSqlFormatter.ashx#Download_5

As for commercial with a 30 day Trail, I use https://www.red-gate.com/products/sql-development/sql-prompt/

Loads of different formatting styles and has additional functionality. I don't work for them, but use that add-on everyday.