| Author |
Message |
neilx
Joined: 20 Apr 2007 Posts: 8
|
Posted: Thu Jul 23, 2009 3:10 pm Post subject: Refactor table to view |
|
|
If I want to rename a table and use a view in its place to prevent applications from breaking, how can I do this?
If I use smart rename, then absolutely everywhere the table is mentioned is changed. Could I limit the changes to tables only (e.g. relationships and triggers) and then create a view with the original name of the table?
Would I be better off scripting the database, creating the view in the script then renaming the table name occurences mainually so I can choose only the occurences I want? |
|
| Back to top |
|
 |
Anu Deshpande
Joined: 20 Apr 2009 Posts: 590 Location: Cambridge
|
Posted: Fri Jul 24, 2009 12:07 pm Post subject: |
|
|
Thanks for your post.
Yes you can follow the below mentioned steps:
1. Rename the table with view.
2. Follow the <Smart Rename> wizard and SQL Refactor will generate the script for the rename of that object.
3. You can than manually remove the queries where you do not want the object rename to be executed.
Kindly let us know if that helped. _________________ Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group