sqlformat
sqlformat copied to clipboard
.NET SQL Parser and Formatter Tool and SSMS Plugin
I tried to open and build the solution in VS2017 but received some errors and some of projects could not be open like these: E:\MyProjects\SQLServer\SSMS_1\sqlformat-master\Laan.SQL.Formatter\Laan.Sql.Formatter.csproj : error : The imported...
**Source** insert into dbo.ATable (Col1, Col2) VALUES ( (SELECT Id FROM Table2), (SELECT Id FROM Table3) ) **Output** INSERT INTO dbo.ATable (Col1, Col2) VALUES ((Laan.Sql.Parser.Entities.SelectStatement), (Laan.Sql.Parser.Entities.SelectStatement)) **Expected Output** INSERT INTO...
The SQL statement `SELECT [\nName] FROM [Table]` fails to enumerate through the tokens in the SqlTokenizer class. A SyntaxException is thrown in RegexTokenizer.ReadNextToken(). Here is the test I had created...
Now I can't say I expect this to format "nicely", but it's got to be better than how NHibernate generates it. exec sp_executesql N' SELECT count(*) as y0_ FROM dbo.SomeView...
Need to add bitwise operations: see [MSDN: Bitwise Operators (Transact-SQL)](https://msdn.microsoft.com/en-au/library/ms176122.aspx) ``` SELECT 1 FROM A WHERE ~A.B & (A.C | A.D) 0 AND A.E ^ 5 = 0 ```
Hi, can you create a README.MD listing known unsupported features? * table-valued functions * table type variables etc. This would have saved me a lot of time; thanks!
SELECT 1 FROM ATable WHERE (NOT (ATable.AReallyReallyLargeField IS NOT null) OR ATable.AReallyReallyLargeField < @p1)
http://blog.bagearon.com/2012/03/sql-server-management-studio-2012-color-themes-extension-support/ FYI looks like SSMS 2012 and above do support MEF extensions by installing into C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Extensions
``` sql SELECT Name FROM Customer WHERE telephone IS NOT NULL AND email IS NULL AND TwitterId IS NULL ``` When parsing the above SQL script, the WHERE condition is...
It would be ideal that the literal values in SQL script are parsed as dedicated literal types, such as StringLiteral, NumberLiteral, BooleanLiteral, etc. Currently they seem to be all parsed...