SSIS
-
Sunday, November 18, 2012 1:07 PMHi i have flat file that will be loaded to database with old records are coming from file will be updated and new records will be inserted to table.what components we are used Here...
N.suresh
All Replies
-
Sunday, November 18, 2012 1:28 PM
Hey,
You can use the SQL Merge : http://www.mssqltips.com/sqlservertip/2260/sql-server-2008-merge-more-than-upsert/
or by SSIS : use DataSource that will be conected to a LookUp component (the line represent the join between the tables, and the V mark is the field to retrieve), next step will be to conect the pipeline to the 'conditional split' and pick the routing for the relevant data .
Please vote as helpful or mark as answer if it helps :) Regards, David .
- Proposed As Answer by Raunak J Monday, November 19, 2012 3:33 AM
- Marked As Answer by Eileen ZhaoMicrosoft Contingent Staff, Moderator Friday, November 23, 2012 7:33 AM
-
Sunday, November 18, 2012 2:08 PMModerator
Search for upsert (update + insert):
http://www.rad.pasfu.com/index.php?/archives/46-SSIS-Upsert-With-Lookup-Transform.html
Can also be done with the standard SCD (but a bit slow if there are a lot of records)

or with a couple of lookups:

(1) check if the businesskey exists
(2) check if attributes are changedOr with TSQL Merge like David mentioned.
tip: change the title of your question to something less general than "ssis"
Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
- Edited by SSISJoostMicrosoft Community Contributor, Moderator Sunday, November 18, 2012 2:09 PM
- Proposed As Answer by Raunak J Monday, November 19, 2012 3:33 AM
- Marked As Answer by Eileen ZhaoMicrosoft Contingent Staff, Moderator Friday, November 23, 2012 7:32 AM

