|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 10/10/2012 : 07:15:41
|
You can set up a linked server to MySql and use OPENQUERY to get the data, compare to what you already have and insert records that do not exist in MSSQL. This page has some information on how to set it up: http://www.sqlservercentral.com/articles/MySQL/88366/
However, another approach, which may perhaps be easier and more predictable is to simply bring in ALL the data from MySQL into a staging table in MSSQL. Once you have it there, writing a query to pick only the rows that you need from the staging table and inserting into your target table is easy. To bring in all the data from MySQL, you can use SSIS, or even Import/Export Wizard in SQL Server. (right click on the database name in object explorer in SSMS and select Tasks -> Import Data |
 |
|