Possible Duplicate:
SQL Formatter for SQL Management Studio
So Visual Studio has a command like Format Document [Ctrl+K, Ctrl+D] is there something similar for SQL Management Studio?
If not is there any other product out there, anywhere, that can help with this?
We have hundreds of these we have to go through in a rather short time span, and as it we spend WAY to much time reformatting them due to poor initial formatting quality.
We are using Microsoft SQL 2008.
I think SQL Refactor is going to take care of me:
SQL Refactor
SQL Assistant has worked very well for me. It is a commercial product (not free), but supports a variety of editors at a (IMO) reasonable price.
Try the tools by Quest Software. See the SQL Navigator/Toad for Oracle and/or Toad for SQL Server.
There are several tools available. I have found some commercial products to be very good for this:
These two work really well. Then you will find some free tools but none of them worked well for me. :-(
All the commercial products have a trial version. Try them in a VM to see if they work for you or not. They are not cheap so you want to know for sure they work for you.
Well, formatting the code online can be done through http://www.dpriver.com/pp/sqlformat.htm . They also provide an offline version.
I can suggest you to use SQL Complete. This tool has convenient formatting. You can also to try free version and to see how does it work.
Your welcome!