This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12487|Reply: 1

[Source] PoorMans Free SQL Server Database T-SQL Formatter

[Copy link]
Posted on 4/9/2022 2:48:25 PM | | | |
Poor Man's T-SQL Formatter

This is a free and open-source SQL (T-SQL) formatter:

  • Handle complete multi-batch scripts, including object definition scripts such as stored procedures, triggers, and so on.
  • Formatting options are provided to meet different common format styles/standards
  • Optionally output "colored" HTML code, not just formatted SQL
  • A "remover" option is also available to remove comments and spaces to confuse rather than print your code beautifully
  • Ready-to-use models are available in a variety of formats
  • SSMS (SQL Server Management Studio) and Visual Studio plug-ins/extensions that allow you to format the current file or selected text with a single hotkey - support for any version of SSMS or SSMS Express, as well as any full (non-Express) version of Visual Studio.
  • Notepad++ plugin for quick one-click formatting in your favorite universal text editor.
  • Command line utility that allows you to batch format as many files as you want, or format from any other program - for windows (.Net) or any environment (node/npm)
  • Winforms app for easy offline formatting (also lets you view token streams and parse trees)
  • The WinMerge plugin for automatically formatting SQL files before comparison allows WinMerge to display only content changes, ignoring formatting differences.
  • Expose a JS library with the same functionality in any browser or other Javascript-based context for demo/formatting sites onlineThe hyperlink login is visible.
  • Also available as a .Net 2.0/3.5 library, available here or for download via NuGet
  • Written in C#, with a pluggable design, other SQL dialects should be supported in the future

Official Website:The hyperlink login is visible.
GitHub address:The hyperlink login is visible.
Online SQL Formatting:The hyperlink login is visible.
Poor Man's T-SQL Formatter has Visual Studio, SSMS, Notepad++ and other plug-ins, which can be well inherited with other tools, taking the SSMS plug-in as an example, download address:The hyperlink login is visible.

PoorMansTSqlFormatterSSMSPackage.Setup.1.6.16.msi (692 KB, Number of downloads: 0, 售价: 3 粒MB)

I installed it nativelySQL Server Management Studio version: 15.0.18390.0, as shown in the figure below:



SQL Server 2016 does not have an administrative tool (SSMS) after installation is complete
https://www.itsvse.com/thread-8281-1-1.html

Before installing PoorMansTSqlFormatterSSMSPackage.Setup.1.6.16,The PC needs to have the .NET Framework 2.0 runtime installed, otherwise the error will be as follows:



To install the installation steps, enable or turn off Windows functions from the control panel and check the installation checkbox, as shown in the figure below:



After installing PoorMansTSqlFormatterSSMSPackage.Setup.1.6.16 again, the error Microsoft is as follows:


---------------------------
Microsoft SQL Server Management Studio
---------------------------
The "FormatterPackage" package failed to load correctly.
This issue can be caused by a configuration change or installing another extension. Details can be obtained by looking at the file "C:\Users\itsvse_pc\AppData\Roaming\Microsoft\AppEnv\15.0\ActivityLog.xml".
Restarting Visual Studio can help resolve this issue.
Keep showing this error message?
---------------------------
Yes(Y) No(N)   
---------------------------

Solution: Open the installation directory, for example: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE folder, editSsms.exe.configThe following documents have been added:



Open the Microsoft SQL Server Management Studio 18 tool again, no longer report an error, and enter a SQL statement, as shown in the following figure:



Click Tools -> Format T-SQL Code, or the shortcut Ctrl+K, F(Before clicking F, you need to release Ctrl), the formatted renderings are as follows:



(End)





Previous:Angular prevents the triggering of the parent click event
Next:【Practice】The Bark app for iPhone message notification push
 Landlord| Posted on 3/13/2025 2:02:53 PM |
SQL Prompt: Easily write, format, analyze, and refactor your SQL (toll

https://www.red-gate.com/products/sql-prompt/
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com