Solved

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

Posted on 2009-04-06
3
1,626 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now