Reputation: 13769
Does the text query editor in MS SQL Server 2008 R2 have a SQL formatter (like many other code editors for other languages, including VB and C# in Visual Studio)?
I want to go from this:
SELECT foo frOm bar where bar.arg > 5
to this:
SELECT foo
FROM bar
WHERE bar.arg > 5
Upvotes: 2
Views: 1025
Reputation: 843
you can use this online formatter:
http://sqlserverlearner.com/online-tools/tsql-code-formatter
Upvotes: 2
Reputation: 8693
You can paste your query into a new view definition and that does have a SQL formatter
Upvotes: 0