Sql_formatter

Alternatives To Sql_formatter
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Sqlfluff6,1751213 hours ago80July 03, 2022361mitPython
A modular SQL linter and auto-formatter with support for multiple dialects and templated code.
Sql Formatter3,89025,62393a year ago6January 12, 201437mitHTML
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting.
Spotless3,51871115 hours ago124September 14, 2022139apache-2.0Java
Keep your code spotless
Pg Promise3,3204,81145312 days ago592August 27, 2022mitJavaScript
PostgreSQL interface for Node.js
Sql Formatter1,62515615117 days ago56July 16, 202235mitTypeScript
A whitespace formatter for different query languages
Pgformatter1,468
a month ago2March 02, 201821postgresqlPLpgSQL
A PostgreSQL SQL syntax beautifier that can work as a console program or as a CGI. On-line demo site at http://sqlformat.darold.net/
Sql Formatter1,307910 months ago11January 12, 201411mitHTML
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting.
Poormanstsqlformatter805
10 months ago1November 22, 2018144agpl-3.0JavaScript
A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.
Coolformat324
4 years ago41C++
CoolFormat Source Code Formatter
Niceql296677 months ago33November 19, 2022mitRuby
niceql gem repo. Nice, colorized SQL formatting in ruby.
Alternatives To Sql_formatter
Select To Compare


Alternative Project Comparisons
Readme

SQL_Formatter

C# SQL statement formatter class

Example

update a set a.ID = b.ID, Name = b.Name from Table1 a 
inner join (select ID, Name from Table2 where Active <> 0 and Current <> 0)  b 
on a.ownerid = b.ownerid and a.type = b.type and b.version = '87.1' 
and a.Name is Null where a.expired <> 0

becomes

update a 
set a.ID = b.ID,
	Name = b.Name 
from Table1 a 
	inner join 
	(
	select ID,
		Name 
	from Table2 
	where Active <> 0 
		and Current <> 0
	) b on a.ownerid = b.ownerid and a.type = b.type and b.version = '87.1' and a.Name is NULL 
where a.expired <> 0

The source

The solution includes a simple winforms demo executable along with the Formatter class. The implementation of the formatter employs a number of routines from unrelated libraried code; I've pulled these fragments into an additional file: LIB.cs.

Popular Formatter Projects
Popular Sql Projects
Popular Text Processing Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Sharp
Sql
Formatter
Fragments
Pretty Print