Search stored procedures


/ Published in: SQL



Copy this code and paste it in your 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

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.