[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]
Now, you can use sp_FindText to finding text inside procedures, functions, triggers, views etc:
[code SQL]sp_FindText 'my_text';[/code]
Use this procedure, you can watch here:
[link http://www.learn-with-video-tutorials.com/how-to-find-a-text-inside-sql-server-code]http://www.learn-with-video-tutorials.com/how-to-find-a-text-inside-sql-server-code[/link]
or here:
[link http://www.youtube.com/watch?v=EXFgC8SBbdI]http://www.youtube.com/watch?v=EXFgC8SBbdI[/link]
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.