Return to Snippet

Revision: 32276
at September 22, 2010 00:08 by samwa


Initial Code
DECLARE @StringToSearch varchar(100) 

SET @StringToSearch = 'searchstring'

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

Initial URL
http://www.knowdotnet.com/articles/storedprocfinds.html

Initial Description

                                

Initial Title
Search stored procedures

Initial Tags
sql

Initial Language
SQL