r/SQL • • Jun 26 '26

SQL Server SQL Indentation

I am working on MS SQL. I have got few scripts of 1000+ line with poor indentaion.

Any tool which i cna use to properly format it.
Please suggest

26 Upvotes

44 comments sorted by

View all comments

Show parent comment

14

u/Sleepy_da_Bear Jun 26 '26

I suggest Notepad++ to everyone. It's my go to for reformatting and bulk replacements. I even have a macro saved that takes all line-ending commas and moves them to the front of the next valid line, skipping code comments, etc. It's saved me tons of time.

-1

u/OldJames47 Jun 26 '26

Shame about the virus that was snuck into the updater.

1

u/ComicOzzy sqlHippo Jun 26 '26

That was highly targeted and unlikely touched anyone reading this.