November 25, 2009 at 7:22 am
I need to use SSIS to import data from an Intersystems database. The source data (Intersystems DB) is made of joined queries. The destination DB tables will be created based on the queries from the source. I need to be able to determine if a record is new or updated. If it is a new record, I need to insert it, otherwise I just need to update the record on the SQL 2005. I am new to SSIS, so I am not sure how to go about. Any suggestions or code samples?
November 25, 2009 at 9:34 am
There are basically 2 methods suggested for doing this:
1. Use a Lookup component and send the unmatched rows to the insert and the matched rows to an Execute SQL Task that does an update. The downside is that this is slow.
2. Use a staging table. Basically your package will purge the staging table, reload it, and then have an Execute SQL Task that does an UPDATE where the row already exists and then an INSERT of the new rows in the staging table using a LEFT OUTER JOIN. Downside is that you need some extra space, upside is that it is faster because the UPDATE and INSERT operations are set-based.
Feel free to post more questions.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy