The below query gives you the list of storedprocedures and the text contained in it.
I am not sure if you will be able to update the syscomments table. I haven't tried it. I thought this could be of some help to start with.
select so.name, sc.text from syscomments sc inner join sysobjects so on sc.id = so.id
where so.xtype = 'P' and sc.text like '%TEXT SEARCHING FOR%'
You could then take that list and script all those stored procedures into one script and then do the find and replace in QA.
I would not recommend trying to replace text in the system tables. If you have script you can see each replacement before accepting it. Could be there are some that you need to keep. For instance suppose you want to change the field name test to test1. If you search for like '%test%' you might also find the places where you have field mytest and it would be disastrous to change that one without knowing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.