I am trying to do something which I think should be very straightforward, but I can't see how to actually do it.
I have two databases which contain the same table with the same structure.
I want to import the data from one database into the other, inserting new rows where they don't exist and updating rows that match on id. This needs to be done every evening.
I am using SQL Server 2012.
I think the best way would be to use an SSIS package with an 'execute sql task' that contains a tsql MERGE statement.
I can't see how to actually do the two database connections the process would need.
I have looked a lot at books on-line, and although it says it is possible, have found no examples.
Any help would be really appreciated.
Thanks.
↧