Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing table name in stored procedures

Status
Not open for further replies.
Dec 5, 2001
44
US

Is there a way to programmatically change a table name in all the stored procedures without having to change it one-by-one?

We have a few dozen stored procedures and would like to change reference to particular table. Say table1 to be changed to table2 everywhere.

Any ideas?

Thanks,
 
Aside from opening the procedure in Query Analyzer, and doing a 'Find and Replace' operation, can't think of anything!
 
You just run SP_DEPENDS before modifying any schema on the database. By that you can get a list of stored procedures which depends on that table.



Good Luck
Gopala Krishna Kakani

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top