Reputation: 326
I have Created a SSIS Package for Importing the Records from One Table to Another table . It is Working Properly But In Source table records are increasing on regular basis . Therefore I am executing package regularly . In Package Before inserting New rows I truncate the records from Destination table then Executing Package .
SQL TASK -1
Truncate table "OLE DB Destination"
SQL TASK -1
CREATE TABLE "OLE DB Destination" (
"ZZCOIL_APPR10" NVARCHAR2(20),
"ZZSTORAGE_LOC10" NVARCHAR2(15),
"ZZDETAIL1" NVARCHAR2(40),
"ZZTOTAL_QTY" NUMBER(7, 2),
"ZZNOTE1" NVARCHAR2(100),
"ZZNOTE2" NVARCHAR2(100)
)
But I don't Want that solution , I want to insert Only Remaining Records which are not present in Destination table .
Upvotes: 3
Views: 2845
Reputation: 36126
you need a lookup transformation.
You will have something like this:
so your component will have the lookup query as "select ID from DestinationTable" for example and you will match them by ID. All the IDs from source that are not found on your destination table will be sent to the "Lookup No Match Output" path, and then you insert them
There are several example on how to use this component over the internet. Here is one
Upvotes: 2