48 results found
-
Code Analysis EI028 Incorrectly Identified When Adding Not Null Column With Explicitly Defined Default Value
Stop raising EI028 when adding columns using style:
ALTER TABLE dbo.MyTable
ADD TestColumnB CHAR(1) NOT NULL,
CONSTRAINT DFMyTableTestColumnB DEFAULT ('B')
FOR TestColumnB;2 votes -
Please re-implement rule DEP001
We extensively use this rule in our organization.
1 vote -
SQL Rule/Issue/Error Search
Like SQL Search, but SQL Error/Issue/Rule violation.
This would list all issues that exist in a database.
Example: "Non-scalar subquery in place of a scalar value"Because these issues can cause major slowdown in queries, and it would be great to have a way to search a whole database to find these rather than having to open all the views, procedures, and functions to find all these things.
1 vote -
Detect variable declared in potentially unreachable scope
Unlike a proper programming language TSQL allows you to declare a variable inside an IF block (or some other scope) and then use the variable outside that IF block, even if the IF block is not entered during run time. This can lead to errors if the code outside the IF is testing for certain values.
It would be good if Code Analysis could detect this as a potentially dangerous coding structure.
E.g.
IF 1 = 0
BEGIN
DECLARE @Var VARCHAR(50) = '123';
END;
SELECT @Var1 vote -
"Manage Code Analysis Rules..." should also be available from the "Options..."-menu
All setup-options, except "Manage Code Analysis Rules..." seems to also be available from the "Options..." menu, which is nice ...
1 vote -
Subquery Column Validation Hint
There's an obscure coding bug that I've seen multiple times in my 20 years of working with SQL Server, and it can be particularly difficult to spot as it doesn't cause a syntax error, yet the havoc it wreaks can be widespread. Consider the following scenario with two tables; they are similar but have differing column names. Now say I want to insert records from StagingTable into FinalTable, but only if they don't already exist there. Yes, there are other ways to handle this like Merge, Left Outer Join etc., but this is still commonly used and you will no…
1 vote -
Add Option to Prevent Cross-DB Analysis
Add option to prevent SQL Prompt from looking across DBs for joins. We have DB Servers with 5000 DBs on them. SQL Prompt struggles to try and evaluate possible cross DB joins. It'd be nice to be able to turn that off so that it only tries to do analysis on the currently selected DB.
1 vote -
PE006 is Too Noisy for Temp table Parallel INSERT
We use the WITH (TABLOCK) hint extensively for loading temp tables - see https://www.sqlshack.com/use-parallel-insert-sql-server-2016-improve-query-performance/
PE006 is far too picky - it yells at every such statement in our high-volume hybrid solution. It would be good to "silence" this kind of rule-breakage so we can see any REAL violations on persisted tables.
Please augment to utterly ignore temp tables.
1 vote
- Don't see your idea?