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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-17 : 07:30:18
|
| Luke Ward writes "Hi, I need to rename a table, and was wondering how to quickly update all me Stored Procedures and sysObejcts etc to with with the new table name.Many ThanksLuke" |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-05-17 : 07:53:51
|
| You can search in syscomments for the tablenameselect distinct object_name(id) from syscomments where text like '%tablename%'hen update them.You could also try dependencies in snterprise manager.Neither is infallible.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
SreenivasBora
Posting Yak Master
164 Posts |
Posted - 2005-05-17 : 18:03:26
|
| Hi,Dont try to do updates in the system tables.Just try this EXEC sp_rename 'TableOLDNAMe', 'TableNewName'With RegardsSreenivas Reddy B |
 |
|
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2005-05-18 : 02:14:32
|
quote: Originally posted by SreenivasBora Hi,Dont try to do updates in the system tables.Just try this EXEC sp_rename 'TableOLDNAMe', 'TableNewName'With RegardsSreenivas Reddy B
Which would only rename the table and not do as the poster asked "...quickly update all me Stored Procedures and sysObejcts etc"AndyBeauty is in the eyes of the beerholder |
 |
|
|
|
|
|