Posted By

samwa on 09/22/10


Tagged

sql


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

samwa
Tyster


Search stored procedures


 / Published in: SQL
 

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

  1. DECLARE @StringToSearch varchar(100)
  2.  
  3. SET @StringToSearch = 'searchstring'
  4.  
  5. SET @StringToSearch = '%' +@StringToSearch + '%'
  6. SELECT DISTINCT SO.Name
  7. FROM sysobjects SO (NOLOCK)
  8. INNER JOIN syscomments SC (NOLOCK) ON SO.Id = SC.ID
  9. AND SO.Type = 'P'
  10. AND SC.Text LIKE @stringtosearch
  11. ORDER BY SO.Name

Report this snippet  

You need to login to post a comment.