This is my format settings (you can import into SQL Prompt):
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!---->
<LayoutOptions version="1" type="LayoutOptions">
<ReservedWordsCasing>1</ReservedWordsCasing>
<BuiltInFunctionCasing>1</BuiltInFunctionCasing>
<BuiltInDataTypeCasing>1</BuiltInDataTypeCasing>
<GlobalVariableCasing>1</GlobalVariableCasing>
<DelimitIdentifiers>False</DelimitIdentifiers>
<IndentationAmount>4</IndentationAmount>
<TabIndentingBehaviour>0</TabIndentingBehaviour>
<ReformatExpressions>True</ReformatExpressions>
<FirstColumnOnNewLine>False</FirstColumnOnNewLine>
<CommasAtStart>False</CommasAtStart>
<MultilineSpacesAfterCommas>False</MultilineSpacesAfterCommas>
<MultilineSpacesBeforeCommas>False</MultilineSpacesBeforeCommas>
<MultilineAlignCommasWithStatement>True</MultilineAlignCommasWithStatement>
<OperatorsOnNewline>True</OperatorsOnNewline>
<OperatorsAtStart>True</OperatorsAtStart>
<IndentBeginToken>False</IndentBeginToken>
<IndentWithExpressionBrackets>True</IndentWithExpressionBrackets>
<IndentWithParameterBrackets>True</IndentWithParameterBrackets>
<IndentWithQueryBrackets>True</IndentWithQueryBrackets>
<CloseBracketsOnNewLine>True</CloseBracketsOnNewLine>
<OpenBracketsOnNewLine>True</OpenBracketsOnNewLine>
<Wrap>True</Wrap>
<WrapWidth>160</WrapWidth>
<ShortLength>15</ShortLength>
<CreateBracketsAtStartOfLines>True</CreateBracketsAtStartOfLines>
<ParameterBracketOnNewline>True</ParameterBracketOnNewline>
<CloseParameterBracketsOnNewLine>True</CloseParameterBracketsOnNewLine>
<CompactShortStatements>False</CompactShortStatements>
<SinglelineSpacesAfterCommas>True</SinglelineSpacesAfterCommas>
<SinglelineSpacesBeforeCommas>False</SinglelineSpacesBeforeCommas>
<SpacesAroundOperators>True</SpacesAroundOperators>
<SpacesAroundComparisons>True</SpacesAroundComparisons>
<FirstParameterDefinitionOnNewLine>True</FirstParameterDefinitionOnNewLine>
<SpacesAfterBrackets>False</SpacesAfterBrackets>
<LayoutSelectStatements>True</LayoutSelectStatements>
<LayoutCreateStatements>True</LayoutCreateStatements>
<QueryNewlineAfterOpenBracket>True</QueryNewlineAfterOpenBracket>
<QueryNewlineBeforeCloseBracket>True</QueryNewlineBeforeCloseBracket>
<JoinConditionsOnNewline>True</JoinConditionsOnNewline>
<AlignConditionsWithJoins>False</AlignConditionsWithJoins>
<AlignJoinsWithFrom>False</AlignJoinsWithFrom>
<AlignSelectWithInsert>True</AlignSelectWithInsert>
<IndentByKeywordWidth>False</IndentByKeywordWidth>
<ColumnsOnSingleLine>False</ColumnsOnSingleLine>
<DoNotIndentProcedureContents>True</DoNotIndentProcedureContents>
<ExecuteParametersOnSingleLine>False</ExecuteParametersOnSingleLine>
<IndentSelectSubclauses>False</IndentSelectSubclauses>
<UseObjectDefinitionCase>True</UseObjectDefinitionCase>
<CamelCaseNameOverrides />
<FormatActionLayout>True</FormatActionLayout>
<FormatActionApplyCasing>True</FormatActionApplyCasing>
<FormatActionInsertSemicolons>True</FormatActionInsertSemicolons>
<FormatActionExpandWildCards>False</FormatActionExpandWildCards>
<FormatActionQualifyObjectNames>False</FormatActionQualifyObjectNames>
<FormatActionRemoveSquareBrackets>False</FormatActionRemoveSquareBrackets>
</LayoutOptions>
I have this SQL and need to be formatted.
INSERT INTO sp_dbcc_ind EXECUTE('DBCC IND(''test'', ''test.dbo.t1'', 1)');
Based on my formatter setting, the formatted code is:
INSERT INTO sp_dbcc_ind
EXECUTE (
'DBCC IND(''test'', ''test.dbo.t1'', 1)'
);
However, what I want is:
INSERT INTO sp_dbcc_ind
EXECUTE ('DBCC IND(''test'', ''test.dbo.t1'', 1)');
Since my formatting setting is tweaked specifically based on my needs, I do not want to change it. Is it possible to add settings that allow the EXECUTE statement to not indent and its parameter in one line?
Thanks.
I have this SQL and need to be formatted.
Based on my formatter setting, the formatted code is:
However, what I want is:
Since my formatting setting is tweaked specifically based on my needs, I do not want to change it. Is it possible to add settings that allow the EXECUTE statement to not indent and its parameter in one line?
Thanks.