Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Non used variables

Author  Topic 

fjudzon
Starting Member

19 Posts

Posted - 2010-07-08 : 11:15:25
Hello People. I have created a SP and I have a lot of variables declared on it.
is any way or any program that show me which variables are not used (like Visual Studio does) ?
I know that I can search one by one, but is any easiest way to do that? thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-08 : 12:39:37
Management Studio doesn't have a way to do that.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

fjudzon
Starting Member

19 Posts

Posted - 2010-07-08 : 13:19:41
yes, I know that, but do you know any app which do that?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-08 : 13:44:12
I don't know of any, sorry.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-07-09 : 02:45:45
quote:
Originally posted by fjudzon

yes, I know that, but do you know any app which do that?


Why do you want to do this?
One option is to see the occurence of a variable. If it is occured only once there is a chance it is not at all used anywhere inside the procedure

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -