Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding a particular field name within hundreds of stored procedures 1

Status
Not open for further replies.

Goalie3533

Programmer
Apr 14, 2004
53
US
I have a particular table field name in which I need to locate each and every occurrence of throughout all of my stored procedures.
The problem however is I have over 100 stored procedures and was just wondering if there was an easier way to locate each and every occurrence of a particular field name within all of my stored procedures than going in to each and every one and manually searching for this field.
For example, you could use the "syscolumns" table to see all of the different field names of all of your tables, which can be helpful(unfortunately, syscolumns doesn't list which stored procedures are using this field as well).
So is there something that shows me where this field occurs within my stored procedures?

Thanks in advance.

-Goalie35
 
I found a utility that does what you need and much more. Including searching any object in the database for text strings, global search and replace and compiling the code.

It is called SQL Editor and you can find it at;

Check it out and post back your thoughts.

Regards
 
You can try this script, this is what I use when I need to find names within a stored procedure. It should list every stored procedure which contains the text entered.

select distinct so.name from syscomments sc inner join sysobjects so on sc.id = so.id where xtype = 'P' AND charindex(' [INSERT TEXT HERE] ', text) > 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top