I've just started using Code Analysis systematically and also find, similar to what I'm used to in working with compiler warnings, that I'd like a pragma to disable a flagging of a specific Issue within a limited scope.
For example, issue PE019 (Consider using EXISTS instead of IN) doesn't apply in a situations where I know the maximum size of the subquery result is tiny. (Probably why the message says "Consider ...".) I'd like to mute this Issue, perhaps like this, building on the similar control for formatting:
...
AND t.someothercondition = 1
-- sql prompt code analysis off PE019
AND t.item IN ( SELECT SplitVal FROM fnSplit(',', @items) )
-- sql prompt code analysis on PE019
AND ...
I've just started using Code Analysis systematically and also find, similar to what I'm used to in working with compiler warnings, that I'd like a pragma to disable a flagging of a specific Issue within a limited scope.
For example, issue PE019 (Consider using EXISTS instead of IN) doesn't apply in a situations where I know the maximum size of the subquery result is tiny. (Probably why the message says "Consider ...".) I'd like to mute this Issue, perhaps like this, building on the similar control for formatting:
...
AND t.someothercondition = 1
-- sql prompt code analysis off PE019
AND t.item IN ( SELECT SplitVal FROM fnSplit(',', @items) )
-- sql prompt code analysis on PE019
AND ...