Using sql-server: Copy views on one database to a table in another, getting new columns as added? on newest questions tagged sql-server – Stack Overflow
I want to be able to copy all data from all views in one database, into tables in another database everyday. In the destination tables there should just be 1 extra column that is the date, so i can do a where date = __ to get what the data was like on a specific day, or range of days etc. all other columns should match the view exactly.
However, in the database that has the views, they could add columns as time goes on. I would like however i do this, to just add the columns onto the destination tables as they are added to the source database views.
I also do not want to ever lose or delete previous data when i get new data, since i want a historical record (on X date, this is what the data was like).
Does anyone have any ideas or point me in the right direction for the best way to do this?
Thanks
source: http://stackoverflow.com/questions/11147355/copy-views-on-one-database-to-a-table-in-another-getting-new-columns-as-added
Using sql-server: using-sql-server
Recent Comments