I'm not sure if there's an easy way to do this, but I want to change the "... from [MyDatabase]..[MyTable]" part in my view to remove the database part so it's just "... from [MyTable]". There are about 100 views that have this.
We use this 3rd party tool to create our database tables and views (no way around this) and in their views they put "... from [MyDatabase]..[MyTable]" . Then later we need to take a snapshot of that database, so we copy the mdf file and change
the database name. The copy is fine, but the views won't work because of this. Is there an easy way to alter all the views to remove the datbase name? There are 100-300 views I have to change, I don't want to write that many alter scripts.
View Complete Post