TaoK / PoorMansTSqlFormatter

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.
http://www.architectshack.com/PoorMansTSqlFormatter.ashx
GNU Affero General Public License v3.0
964 stars 267 forks source link

How to prevent adding "GO" at end ? #287

Open tormozit opened 1 year ago

tormozit commented 1 year ago

input

SELECT
T1._IDRRef
FROM dbo._Reference26X1 T1
WHERE ? IN
(SELECT
? AS Q_001_F_000_
FROM (SELECT
T3._Fld14500RRef AS Fld14500RRef
FROM dbo._InfoRgSL31415 T3) T2
WHERE (T2.Fld14500RRef = T1._IDRRef))

output

SELECT T1._IDRRef
FROM dbo._Reference26X1 T1
WHERE ? IN (
        SELECT ? AS Q_001_F_000_
        FROM (
            SELECT T3._Fld14500RRef AS Fld14500RRef
            FROM dbo._InfoRgSL31415 T3
            ) T2
        WHERE (T2.Fld14500RRef = T1._IDRRef)
        )
GO

I wand to remove final "GO" I use command line tool SqlFormatter for Windows

is  indentString (default: \t)
st  spacesPerTab (default: 4)
mw  maxLineWidth (default: 999)
sb  statementBreaks (default: 2)
cb  clauseBreaks (default: 1)
tc  trailingCommas (default: false)
sac spaceAfterExpandedComma (default: false)
ebc expandBetweenConditions (default: true)
ebe expandBooleanExpressions (default: true)
ecs expandCaseStatements (default: true)
ecl expandCommaLists (default: true)
eil expandInLists (default: true)
uk  uppercaseKeywords (default: true)
sk  standardizeKeywords (default: false)
ae  allowParsingErrors (default: false)
e   extensions (default: sql)
r   recursive (default: false)
b   backups (default: true)
b   outputFileOrFolder (default: none; if set, overrides the backup option)
l   languageCode (default: current if supported or EN; valid values include EN, FR and ES)