Click here to Skip to main content
11,479,486 members (46,355 online)
Click here to Skip to main content

Tagged as

Find particular word or text from the entire stored procedure

, 26 Apr 2011 CPOL 3.8K 2
Rate this:
Please Sign up or sign in to vote.
You can create a simple stored procedure like that:DECLARE @StringToSearch varchar(100)SET @StringToSearch = 'GetEmployee'SET @StringToSearch = '%' +@StringToSearch + '%'SELECT Distinct SO.NameFROM sysobjects SO (NOLOCK) INNER JOIN syscomments SC (NOLOCK) on SO.Id = SC.ID AND...
You can create a simple stored procedure like that:
DECLARE @StringToSearch varchar(100)
SET @StringToSearch = 'GetEmployee'
 
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
GO

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

NGO Quang Minh

United States United States
No Biography provided

Comments and Discussions

 
GeneralReason for my vote of 5 Reason for my vote of 5 Good one Pin
RaviRanjankr19-May-11 19:02
mvpRaviRanjankr19-May-11 19:02 
GeneralReason for my vote of 2 syscomments gives you the first 4000... Pin
dmjm-h3-May-11 6:59
memberdmjm-h3-May-11 6:59 
GeneralGreat! Pin
Sunasara Imdadhusen2-May-11 23:57
memberSunasara Imdadhusen2-May-11 23:57 
GeneralReason for my vote of 5 Good One!! 5d. Pin
Gandalf - The White29-Apr-11 2:10
memberGandalf - The White29-Apr-11 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 26 Apr 2011
Article Copyright 2011 by NGO Quang Minh
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid