TSQL Code formatter - SQL Server 2005/2008 [closed

2019-02-11 09:05发布

问题:

Is there a free code formatter available for TSQL - SQL Server 2005/2008. I found few most of which asks to copy paste code online in an applet. I am looking for a desktop version. Tried toad for sql server but formatting is not supported in freeware. If anyone has any work-around please share it.

回答1:

Check out the SSMS Tools Pack (free addon for SSMS).

One of the features is formatting (http://www.ssmstoolspack.com/Features?f=3), though I don't know what level you want your SQL formatted - maybe you could clarify?



回答2:

I've been working on a formatter for the past few months, I just release the official version v1.0, with no (major) known issues.

It's available for immediate online use at http://poorsql.com, and the project with SSMS Add-In, command-line formatter ready-to-download is available at http://www.architectshack.com/PoorMansTSqlFormatter.ashx.

I know it's been a long while since this question was posted, but I'd love any sort of feedback.

(Edit: updated status)



回答3:

SQLISE has a formating function, you can set a number of formatting options. It is free. It is a codeplex project based on PowerShell.

Drawback it removes all comments link text



回答4:

This online tool does excellent sql formatting. http://sqlserverlearner.com/online-tools/tsql-code-formatter

I use it to format tsql code