1. Find_SP
CREATE PROCEDURE Find_sp @StringToSearch VARCHAR(100)
AS
SET @StringToSearch = '%' + @StringToSearch + '%'
SELECT DISTINCT so.name
FROM sysobjects so (nolock)
WHERE so.TYPE = 'P'
AND so.name LIKE @StringToSearch
ORDER BY so.name
2. Find_Text_In_SP
CREATE PROCEDURE Find_text_in_sp @StringToSearch VARCHAR(100)
AS
SET @StringToSearch = '%' + @StringToSearch + '%'
SELECT DISTINCT so.name
FROM sysobjects so (nolock)
INNER JOIN syscomments sc (nolock)
ON so.id = sc.id
AND so.TYPE = 'P'
AND sc.TEXT LIKE @stringtosearch
ORDER BY so.name
Tidak ada komentar:
Posting Komentar