#Declare an input text as given below.
DECLARE@SEARCH_TEXT VARCHAR(255)
#Query for Search Text in Stored Procedure
SELECT DISTINCT
OBJ.NAME AS
OBJECT_NAME,
OBJ.TYPE_DESC
FROM SYS.SQL_MODULES MOD
INNER JOIN SYS.OBJECTS OBJ ON
MOD.OBJECT_ID = OBJ.OBJECT_ID
WHERE MOD.DEFINITION LIKE '%'+@SEARCH_TEXT+'%'
ORDER BY TYPE_DESC
No comments:
Post a Comment