Create the procedure (SQL Server 2012):
[code SQL]CREATE PROCEDURE sp_FindText @p_text varchar(100)
AS
SELECT DISTINCT name, type
FROM sys.sysobjects so WITH (NOLOCK)
INNER JOIN sys.syscomments sc WITH (NOLOCK)
ON so.id = sc.id
WHERE text LIKE '%' + @p_text + '%'
ORDER BY name[/code]...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.