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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search all sprocs for certain table in same database

Status
Not open for further replies.

DataDudeInGA

Technical User
Feb 18, 2003
3
US
Hey guys I'm new to SQL server and need some help. I have over one hundred tables in a company database and over 90 sprocs. There is a specific table I want to search for in all my user sprocs.

How do I do that in SQL Server 2000? Someone told me SQL Server had system procedures already created for that but haven't found it yet. Any help you can provide will be appreciated.

Datadudeinga sends
 
This should do the trick for you. The name of the procedure will be in the name column.

Code:
select *
from sysobjects
join syscomments on sysobjects.id = syscomments.id
	and syscomments.text like '%tablename%'

Denny

--Anything is possible. All it takes is a little research. (Me)
 
Sorry for the late reply. But, thanks very very much....worked like a charm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top