Loading a new database from an Old one

Tags:
Database structure
SQL Server 2008
SSIS
I am new to SSIS. We are running SQL Server 2008, and I have to load a new database from an old one which had a different structure. I'm not sure how to cope with PK's that are identities. For example, I have three tables: 1) Main table eg. A list of applications 2) Joiner table eg. A list of addresses 3) Reference table eg. For address types I have loaded tab1 but ignored FK to tab2, as I do not know what the FK is because this has not been generated yet. How do I now load tab2 AND update tab1 FK field with the now generated PK from tab2? I hope I have explained that OK. Thanks
ASKED: March 2, 2010  4:16 PM
UPDATED: March 2, 2010  6:24 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You are going to most likely have to right what you need in a VB..Net or C# script. I have one that inserts into table A, gets a value from an identity column and uses that to insert into table B. Sounds like that is what you are looking to do.

–josef

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following