When I select Find unused variables and parameters, it identifies variables that are contained in strings and used in dynamic SQL statements as unused.
Comments
1 comment
-
dsdeming wrote:When I select Find unused variables and parameters, it identifies variables that are contained in strings and used in dynamic SQL statements as unused.
I'm not sure if I understand you correctly.
If we have something like :declare @a varchar(10) set @a = 'Hi' exec ('print''' + @a + ''' ')
then we do find the usages for "@a" properly.
Could you post an example for your problem. On the other hand parsing the contents of dynamic SQL is outside the scope of our current project and in many cases this problem cannot be solved at all by static analysis.
Regards,
Andras
Add comment
Please sign in to leave a comment.