How can we help you today? How can we help you today?
opc.three

Activity overview

Latest activity by opc.three

BUG: incorrect alias attempt
IF EXISTS ( SELECT c.name as column_name FROM sys.schemas s JOIN sys.tables t ON s.schema_id = t.schema_id JOIN sys.columns c ON...
2 followers 2 comments 0 votes
Sorry, in my attempt to cleanse my actual code to provide repro code I neglected to take out the schema name. That said, the problem persists without the schema name. Please try it out with my version. USE tempdb; CREATE TABLE #tmp (id INT, name VARCHAR(100)) CREATE TABLE #tmp2 (id INT, name VARCHAR(100)) DELETE FROM #tmp WHERE id = ( SELECT id FROM #tmp2 WHERE name = 'abc' ) AND name = 'xyz'; My style document: <?xml version="1.0" encoding="utf-16" standalone="yes"?> <!----> <LayoutOptions version="1" type="LayoutOptions"> <ReservedWordsCasing>1</ReservedWordsCasing> <BuiltInFunctionCasing>1</BuiltInFunctionCasing> <BuiltInDataTypeCasing>1</BuiltInDataTypeCasing> <GlobalVariableCasing>0</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>False</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>False</JoinConditionsOnNewline> <AlignConditionsWithJoins>False</AlignConditionsWithJoins> <AlignJoinsWithFrom>False</AlignJoinsWithFrom> <AlignSelectWithInsert>False</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>True</FormatActionQualifyObjectNames> <FormatActionRemoveSquareBrackets>True</FormatActionRemoveSquareBrackets> </LayoutOptions> / comments
Sorry, in my attempt to cleanse my actual code to provide repro code I neglected to take out the schema name. That said, the problem persists without the schema name. Please try it out with my vers...
0 votes
Error formatting MERGE statement in WHEN NOT MATCHED BY
WHEN NOT MATCHED BY SOURCE AND SomeID = @SomeID THEN DELETE The above code inside a MERGE statement is giving SQL Prompt problems causing it to show a Syntax error underlining column SomeID.
3 followers 4 comments 0 votes
Error when formatting otherwise valid SQL with subqueries
Repro:USE tempdb; CREATE TABLE #tmp (id INT, name VARCHAR(100)) CREATE TABLE #tmp2 (id INT, name VARCHAR(100)) DELETE FROM #tmp WHERE id = ( SELECT id FROM ...
2 followers 3 comments 0 votes
Manage multiple Extended Properties, not just MS_Description
I am evaluating SQL Doc and am curious if there is a way to have the tool allow us to edit Extended Properties besides only the one named MS_Description. At present it is displaying other named pro...
1 follower 1 comment 0 votes
"Find Unused Variables and Parameters" at command line
I am a big fan of SQL Prompt! The "Find Unused Variables and Parameters" feature is very useful and has allowed us to clean up many wasteful declarations as we work on existing objects. All of our ...
1 follower 1 comment 0 votes