Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Reformat the T-SQL

Author  Topic 

ugh3012
Yak Posting Veteran

62 Posts

Posted - 2013-07-17 : 16:00:00
Is there a way to reformat the T-SQL? I opened an old T-SQL and it is long and messy. I want it to reformat it like it does in .Net.

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-17 : 16:01:38
There are commercial tools available that can do that - Red Gate has one, Softree has another one and so on. There are free tools as well - one I would particulary recommend is http://www.ssmstoolspack.com/Features

Editing: It used to be free, but starting with SQL 2012, I think he charges some nominal amount.
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2013-07-17 : 17:49:01
Far from perfect; but this one, free, online option:
http://www.dpriver.com/pp/sqlformat.htm
Go to Top of Page
   

- Advertisement -