buck.woody
LinkedIn | FaceBook | Twitter
Resume
I do love me some good-looking code. Sure, the syntax has to be there, and the code has to be correct and all that, but I'm old-school, and I think pretty code is easier to read. I'd love to have a "code beautifier" built right in to SQL Server Management Studio, but I suppose there's other stuff in line before that work starts :)
James Wang, a long-time reader, has created a free online T-SQL Formatter. There's a few others out there, but the one James wrote has a lot of options, so bop on over there and give it a try. Post a comment if you do and let us know how it works for you.
Thanks, James!
http://www.wangz.net/pp/sqlformat.htm http://www.wangz.net/pp/faq.htm
It's not free, but SQL Assistant from SoftTree Technologies (www.softtree.com) is an excellent beautifier (among its many capabilities).
Thank you for submitting this cool story - Trackback from DotNetShoutout
It stops formatting at 100 lines for my attempt.
Does not understand MSSQL 2008 R2 XML and Namespaces
you can get free online sql beautifier here sqlserverlearner.com/.../tsql-code-formatter