I'm not sure how it works so I'm looking for the right solution. I think SSIS is the right way to go but I have never used it before
Scenario:
Every morning, I get a tab delimited file with 800K records. I need to load it into my database:
- Get file from ftp or local
- First, I need to delete the one which not exists in new file from database;
- How can I compare data in tsql
- Where should I load data from tab delimited file in order to compare it with the file? Should I use a temp table?
ItemIDis the unique column in the table.
- Second, I need to insert only the new records into the database.
- Of course, it should be automated.
- It should be efficient way without overheating SQL Database
Don't forget that the file contains 800K records.
Sample flat file data:
ID ItemID ItemName ItemType
-- ------ -------- --------
1 2345 Apple Fruit
2 4578 Banana Fruit
How can I approach this problem?