Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert or Update in one pass?

Status
Not open for further replies.

Bennie47250

Programmer
Nov 8, 2001
515
US
We currently use a product called Data Junction (DJ) to populate a warehouse. I have been assigned the task of rewriting this process in DTS. Most of what needs to be done seems straightforward except for one aspect. In DJ we are moving records from our AS400 DB2 Order Header table SQL 7.0 version of the same table. As DJ is moving the records, it knows to ether update a record if it already exists in the table, or to add the record if the record does not exist in the table, all in one pass.

I have seen where I can create an Insert or Update process but not do both at once. How do you go about this in DTS?

Also any suggested readings for DTS? I have picked up the “SQL Server 2000 DTS” book by Timothy Peterson and reviewed it. Hoping I could find something a little easier to follow and perhaps something that would walk me thru a few exercises to get started with DTS.

Thanks
Bennie
 
I don't think this is possible in one pass. You will need an UPDATE for the rows that already exist and an INSERT for the rows that don't exist.

has some great information on many aspects of DTS. Its been a huge help for me. Good luck!

--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top