I have recently inherited a mess from the developer who used to sit in this chair over a year ago. One of the many things he did is create nearly identical tables in many databases (such as having a Users table in each database that contains exactly the same information). I am attempting to eliminate all the manual work that is currently being done every time a new employee is hired by eliminating these duplicate tables.
I have created a SQL view that represents data exactly as the old table did. It pulls it's data from the master database, but all the tables I need (and this new view) are all on the same DB. There is no need for the application I am working with to modify the users table, so it only needs read access (so a view should be fine, right?).
Is there any way to simply replace the table in code with the new view? I would be happy to provide more information if needed.
if the created view has the same name and same columns as the original table, it will work without app modification. It is also possible to modify data throught this view (with some restrictions...), see https://msdn.microsoft.com/en-us/library/ms180800.aspx .