It has been quite a long time since I've used SSIS. I'm using SSIS 2012. I'd like to insert rows from one table into another table. But, I'd like to only insert rows from the source, into the destination, that don't exist in the destination, based on the primary key. For existing rows, I'd like to simply ignore the rows from the source. I know it's a simple matter to insert rows from one table to another, but what's the best (most efficient) way to check to see if a row from the source exists in the destination and ignore it if it does?
相关问题
- SQL Server Import Wizard doesn't support impor
- Bulk insert from excel to sql for selective fields
- What other dependencies do I need to install in Vi
- Deployed SSIS Package not reflecting changes made
- Building SSIS solution using visual studio online
相关文章
- SSIS solution on GIT?
- How can I manually fail a package in Integration S
- See complete tooltip error message for Data Flow S
- Save content of Email body in outlook to a file
- What is Big Data & What classifies as Big data? [c
- What is the actual use of buffer temp and blob tem
- Object Variable in script tasks
- SSIS Script Task Not Running Excel Macro With AddI
Between your source and destination component, add a Lookup Component.
Configure the Lookup to Redirect to No Match Output for unmatched rows.
In your lookup source, write a query like
SELECT T.PK1, T.PK2 FROM dbo.MyTable T
where you only pull back the primary keys and then compare you input data to the target table's.What comes out of the no match output will be rows that do not exists in the destination.
Sample screenshots for a 2008 problem
Importing a large data file with sorts and joins in SSIS