Wednesday, March 7, 2012

Find In...Stored Procedures?

All:
Is there a way to do a "Find" across the text of a set of stored
procedures? (SQL Server 2000)
I am in the process of doing some code refactoring and have eliminated
a column in one of my tables. Now, I want to find all the stored
procedures that use the column name.
Is there a way to do this? Alternatives?
Many thanks,
JohnHow do I find a stored procedure containing <text>?
http://www.aspfaq.com/show.asp?id=2037
AMB
"jpuopolo@.mvisiontechnology.com" wrote:

> All:
> Is there a way to do a "Find" across the text of a set of stored
> procedures? (SQL Server 2000)
> I am in the process of doing some code refactoring and have eliminated
> a column in one of my tables. Now, I want to find all the stored
> procedures that use the column name.
> Is there a way to do this? Alternatives?
> Many thanks,
> John
>|||Look at the syscomments table; it contains the text for your stored
procedures and views.
SLECT *
FROM syscomments
WHERE text like '%[column name]%'
HTH,
Stu|||Stu:
Thanks - worked like a charm.
Best,
John|||Use dbname
go
SELECT OBJECT_NAME(ID) from syscomments
where TEXT like '%columnname%'
Thanks
Hari
SQL Server MVP
"Stu" <stuart.ainsworth@.gmail.com> wrote in message
news:1126359684.486000.4260@.g49g2000cwa.googlegroups.com...
> Look at the syscomments table; it contains the text for your stored
> procedures and views.
> SLECT *
> FROM syscomments
> WHERE text like '%[column name]%'
> HTH,
> Stu
>

No comments:

Post a Comment