Re: Find a spesific text from a Sp

Re: Find a spesific text from a Sp

 

  

That's a good one, thanks Ed. I have always scripted them out in the past and used notepad to search for strings.

Have a red stripe on me today!!

Stephen Dyckes



-----Original Message-----
From: Edwards Ed <mssqldba-ezmlmshield-x90022056.[Email address protected]
To: LazyDBA Discussion <[Email address protected]
Sent: Sun Sep 30 07:46:01 2007
Subject: RE: Find a spesific text from a Sp

Well, well, well,
It's Aradana Liyanage! Hehe. How have you been?

declare @srch varchar(50)
/* specify the searchstring here */
set @srch='project_name'
SELECT
Object_Name(c1.id) name,
substring(c1.text,(CHARINDEX(@srch,c1.text)-5),60) as text
FROM syscomments c1
LEFT OUTER JOIN syscomments c2 ON c1.id = c2.id AND c2.number =
c1.number + 1
WHERE Cast( c1.text AS varchar(4000) )+ Coalesce( Cast( c2.text AS
varchar(4000) ), '' )
LIKE '%'+@srch+'%'
/* add more search conditions here as desired */ ORDER BY 1


It will soon be NFL time! Hehe. Partyyyyyyy! Hehe.

Have a great Day and Weekend!






Please take a few minutes to provide feedback on the quality of service you received from our staff. The Department of Education values your feedback as a customer. Commissioner of Education Jeanine Blomberg is committed to continuously assessing and improving the level and quality of services provided to you.Simply use the link below. Thank you in advance for completing the survey.


http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]




-----Original Message-----
From: Aradana Liyanage
[mailto:mssqldba-ezmlmshield-x94170326.[Email address protected]
Sent: Saturday, September 29, 2007 5:03 AM
To: LazyDBA Discussion
Subject: Find a spesific text from a Sp

Hi Gurus



I am using SQL 2000.

My web app uses Sql stored procedures. I just wanted to find a specific
stored procedure which contains some specific text



Eg : I wanted to find a sp which has a text "project_name" in it



Is this possible?



Aradhana





---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


-----------------------------------------
The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

MS Sql Server LazyDBA home page