Solved

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

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

705 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

18 Experts available now in Live!

Get 1:1 Help Now