opticon
opticon

Reputation: 3614

SSIS Migration - Pulling IDs from dest DB?

So I'm working on migrating some data to a new server. In the new server, each entry in the MAIN table is assigned a new GUID when the transfer takes place. A few other tables must be migrated, and their records must link to the GUID in the MAIN table. Example...

WorksheetID --- GUID
1245677903 --- 1

AccidentID --- WorksheetID --- Guid
12121412 --- 1245677903 --- 1

The guid is used moreso for versioning purposes, but my question is this. In SSIS, is there any way to pull the Worksheet's GUID from the destination database and assign it directly to the entries in the 'Accident' table? Or do I have to just dump the data into the source DB and run some scripts to get everything nicely referenced? Any help would be greatly appreciated.

Upvotes: 1

Views: 80

Answers (2)

Tom H
Tom H

Reputation: 47392

You should be able to do this using a Merge Join Transformation. You might need to pass your data through a Sort Transformation first before merging them.

Your inputs to the Merge Join Transformation will be the Accident table from your source data and the Worksheet table from your destination database. Just do the merge join on the WorksheetID.

Upvotes: 0

Related Questions