To find a text or string or keyword across all function and procedure in sql server 2005 using INFORMATION_SCHEMA.ROUTINES & SYS.SQL_MODULES
Option1:
select * from INFORMATION_SCHEMA.ROUTINESProvides all the details of user-defined Function and Procedure in current database.
select ROUTINE_NAME, ROUTINE_DEFINITION from INFORMATION_SCHEMA.ROUTINES where ROUTINE_DEFINITION like '%testtable%'
select * from sys.sql_modules where definition like '%test%'
Thanks, this has saved lot of my time
Hi, I was reading your article and I would like to appreciate you for making it very simple and understandable. This article gives me a basic idea of stored procedure and it will help me a lot. Over the internet, I've found some other good article which also explained very well on SQL Stored Procedure.... check this helpful links... http://www.mindstick.com/Blog/200/SQL%20Stored%20Procedure http://msdn.microsoft.com/en-us/library/aa174792%28v=sql.80%29.aspx Thanks Everyone!!