SQL の整形ツールです。SQL Server Management Studio向けのアドイン、Windows フォームベースのアプリケーション、コマンドラインアプリケーション、WinMerge のアドイン、NotePad++ のアドインが提供されています。
- SSMS and Visual Studio Add-In (setup program): SqlFormatterSSMSAddIn.Setup.1.5.3.msi (9730 downloads for this version, about 30000 for previous versions).
- WinForms App (simple exe): SqlFormatterWinForms.1.5.1.zip (1637 downloads this version, about 11500 for previous versions)
- Command-line bulk formatting utility (simple exe): SqlFormatter.1.5.1.zip (713 downloads for this version, about 2600 for previous versions)
- WinMerge Plugin for SQL Script comparison (setup program): PoorMansTSqlFormatterWinMergePlugin.Setup.1.5.1.msi (583 downloads for this version, about 2000 for previous versions) (WinMerge is a free GPL-licensed file comparison tool, available at winmerge.org)
- Notepad++ plugin: It's recommended to use the Notepad++ plugin manager if possible (Notepad++ is an amazing free GPL-licensed text editor, available at notepad-plus-plus.org; it has a very rich plugin community available through the "Plugin Manager" plugin that is installed by default).
If you really want to install the plugin manually, you can get it from here: SqlFormatterNppPlugin.1.5.1.zip (47187 downloads for the latest version, about 95000 for previous versions) and unzip the entire contents of the ZIP file (1 DLL + 1 folder containing other DLLs and stuff) into your Notepad++ install folder's "plugins" subfolder, eg "C:\Program Files\Notepad++\plugins". If you get an error about the plugin not supporting unicode, then the wrong DLL is in the plugins folder, simply delete the incorrect DLLs and start again (please contact me for help if you have any issues with this).
長い SQL 文を書くと、タブとかスペースの位置を変えるのに結構苦労したりしますよね。便利なツールです。