Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How Do I Update Records with SSIS and NOT INSERT new rows!?

Posted on 2009-04-06
3
Medium Priority
?
1,637 Views
Last Modified: 2013-11-10
Here is my dilema:

I need to pull information from one database (we'll say database A) and update records in another database (database B) based on common information in both databases.

I already have an SSIS package that can essentially get the correct information I need (using the Lookup Dataflow), but the problem I am having is that it seems that all I can do is "insert" new rows into database B.  If I export the data to a flatfile, all is well, but that's not what I want.  My goal is to use SSIS to update records in database B to have information from database A, but if it doesn't exists in database B, then we cannot add it.

Any ideas?  From what I can see and read, all of the dataflow destinations do INSERTS only, but I want simply to update records.  (The only reason I haven't done this with T-SQL scripting is because I felt that SSIS would be a better tool given that there are some data conversions that must take place since the comparing columns in database A and database B are of different types, but essentially the same data.)
0
Comment
Question by:VFCC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Expert Comment

by:QPR
ID: 24084603
Why not use an execute sql task rather than a data flow
0
 
LVL 29

Expert Comment

by:QPR
ID: 24084616
oops just re-read... what you are trying to do sounds like a data pump task to use a DTS term. Copy column etc. To my knowledge this is importing data into table B from table A (in other words an insert)

A sql task within your package can work fine. Google "update based on a join"
0
 
LVL 2

Accepted Solution

by:
VFCC earned 0 total points
ID: 24100555
Well, the purpose was to make this so it only updates information and never adds any new or unique information.  I know that it doesn't fall under a lot of typical ETL situations, but doing any inserting of newer data in this case would cause more damage than good.  That being said, there is also the fact that the tables are in completely different databases for different 3rd party applications.

What I found is that I could use the OLD DB Command Data Flow Transformation Object and use it to run a parameratized update query.  While this probably isn't the best way, our institution is rather small and the approximately 5 second processing time of the package is acceptable.
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question