Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to batch replace the characters in the sp

Author  Topic 

rockyzlwang
Starting Member

2 Posts

Posted - 2008-08-21 : 07:43:34
in the sql server 2005, how to batch replace one characters to another in all of the store procedures and functions? I have more than 200 store procedures in the database and would like to replace one word in all store procedures. do you have same simple solution, like as using T-SQL?

Thanks

rocky wang

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-21 : 08:13:18
quote:
Originally posted by rockyzlwang

in the sql server 2005, how to batch replace one characters to another in all of the store procedures and functions? I have more than 200 store procedures in the database and would like to replace one word in all store procedures. do you have same simple solution, like as using T-SQL?

Thanks

rocky wang


Script out the procedures to text file
Do search and replace
Execute the code

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rockyzlwang
Starting Member

2 Posts

Posted - 2008-08-21 : 08:22:50
quote:
Originally posted by madhivanan

quote:
Originally posted by rockyzlwang

in the sql server 2005, how to batch replace one characters to another in all of the store procedures and functions? I have more than 200 store procedures in the database and would like to replace one word in all store procedures. do you have same simple solution, like as using T-SQL?

Thanks

rocky wang


Script out the procedures to text file
Do search and replace
Execute the code

Madhivanan

Failing to plan is Planning to fail



thanks.

do have any other way except export to txt first, and only use T-SQL statement to do that? I rememnbered that there is a simple way by T-SQL statement to do, but I forgot it now.
and there are too much store procedures and functions in database, not easy to export to txt in fact.

thanks again.

rocky wang
Go to Top of Page
   

- Advertisement -