SSIS to copy data from one table to another, where not in destination table

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-03-19T11:36:31Z Indexed on 2010/03/19 11:41 UTC
Read the original article Hit count: 178

Filed under:
|

I'm in the process of creating an SSIS package on a server (server1) that looks at the data in a sql db on another site (server2) and copies relevant rows across.

The SQL statement required is:

SELECT *
FROM server2.ordersTable
WHERE
OrderID Not In (SELECT OrderID FROM server1.ordersTable

This selects data from server1 which isn't in the table on server2 (based on order id) I then need to insert the result into a table on server1

How would I approach this? What components do I need etc...?

© Stack Overflow or respective owner

Related posts about ssis

Related posts about sql-server-2008