New code analysis rule: predicate data type agreement
Please create a rule that detects when the data type of input parameters, local variables, and/or expressions do not match the data type of the column in a predicate.
For example, if we have
a Person table, with column LastName varchar(60) NOT NULL, and
in the body of a stored procedure which has an input parameter defined as @LastName nvarchar(100)... and a predicate like WHERE Person.LastName = @LastName [join, apply, correlation, and functions also need this]
It would be wonderful - save me massive amounts of time - if SQLPrompt could flag this and help reduce implicit conversions.
Thank you!
2
votes
Mike
shared this idea