Steven
Steven

Reputation: 13769

Microsoft SQL Server Query Text Formatter

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

Answers (2)

Gayanee Wijayasekara
Gayanee Wijayasekara

Reputation: 843

you can use this online formatter:

http://sqlserverlearner.com/online-tools/tsql-code-formatter

Upvotes: 2

Seph
Seph

Reputation: 8693

You can paste your query into a new view definition and that does have a SQL formatter

Upvotes: 0

Related Questions