2 Ways to search for a given text is available in a list of Stored procedure in sql

Karthikanbarasan
Posted by Karthikanbarasan under Sql Server category on | Points: 40 | Views : 1620
SELECT ROUTINE_NAME, ROUTINE_DEFINITION 
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%TextSearch%'
AND ROUTINE_TYPE='PROCEDURE'


SELECT OBJECT_NAME(id)
FROM SYSCOMMENTS
WHERE [text] LIKE '%TextSearch%'
AND OBJECTPROPERTY(id, 'IsProcedure') = 1
GROUP BY OBJECT_NAME(id)

Comments or Responses

Login to post response