SQL - Find SP Name by searching the content within it.

-- Query to find SP Name based on search string pattern in the SP SELECT DISTINCT o.name AS Object_Name, o.type_desc FROM sys.sql_modules m INNER JOIN sys.objects o ON m.object_id=o.object_id WHERE m.definition Like '%[Test]%';
If we want to search a string in a Stored Procedure we use the given query to retrieve the Stored Procedure name.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.