Appending Records from Linked Tables to the *Real* Linked Tables

T

tbl

When dredging up older data from two tables that *should*
have been related but weren't, I've managed to get them
related, and spiffed up for appending to the linked tables
in my current db.

What I'm unsure about, is whether or not I need to do the
append in steps, or if I can do it all at once.

My level of expertise only allows the two step plan, where I
would append the main table data first, and then be able to
fetch the autonumbered Id field value (the new key) to
update in the child table (using the old keys), and then
append that one.

Is there anything better, short of pages of code that make
my hair catch fire?
 
A

Allen Browne

Yes, it will be a 2-stage operation: appending the primary record first, so
you have the new primary key value, and then using that value for the
foreign key of the related table.

Since it sounds like this is a one-off operation, it is probably not worth
writing the code to automate this process.
 
T

tbl

Yes, it will be a 2-stage operation: appending the primary record first, so
you have the new primary key value, and then using that value for the
foreign key of the related table.

Since it sounds like this is a one-off operation, it is probably not worth
writing the code to automate this process.


Thanks Allen. Backing up, gritting teeth, getting set. <g>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top