SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to locate a phrase in all sp of a database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AdamWest
Constraint Violating Yak Guru

USA
357 Posts

Posted - 09/27/2012 :  09:35:54  Show Profile  Reply with Quote
HI I have this phrase "@FACILITYKEY CHAR(4)" which i need to modify in any sp it is located in.

HOw can I get a list of such sp's?

Much thanks in advance,
Adam

robvolk
Most Valuable Yak

USA
15679 Posts

Posted - 09/27/2012 :  09:42:53  Show Profile  Visit robvolk's Homepage  Reply with Quote
SELECT name FROM sys.objects WHERE OBJECT_DEFINITION(object_id) LIKE '%@FACILITYKEY CHAR(4)%'
Go to Top of Page

webfred
Flowing Fount of Yak Knowledge

Germany
8765 Posts

Posted - 09/27/2012 :  09:43:57  Show Profile  Visit webfred's Homepage  Reply with Quote
more ideas
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=100884


Too old to Rock'n'Roll too young to die.
Go to Top of Page

AdamWest
Constraint Violating Yak Guru

USA
357 Posts

Posted - 09/27/2012 :  09:44:53  Show Profile  Reply with Quote
Very nice Rob, thanks. Just was wondering, suppose i am only interested in my sp's which all start with a DBD as in
DBD_MySP1.


quote:
Originally posted by robvolk

SELECT name FROM sys.objects WHERE OBJECT_DEFINITION(object_id) LIKE '%@FACILITYKEY CHAR(4)%'

Go to Top of Page

robvolk
Most Valuable Yak

USA
15679 Posts

Posted - 09/27/2012 :  09:49:35  Show Profile  Visit robvolk's Homepage  Reply with Quote
SELECT name FROM sys.objects WHERE name LIKE 'DBD%' AND OBJECT_DEFINITION(object_id) LIKE '%@FACILITYKEY CHAR(4)%'
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000