General discussion

Locked

Combining Access databases logically

By demaio ·
I have two separate databases, Db A has data from 1944-79, and Db B has data from 1944-98. They both have an ID, year, and Tritium columm, but there is other information in columns that aren't necessarily the same for both databases. Unfortunately, the Tritium values in Db A are incorrect, and need to be replaced with those in Db B. Also, Db B has many more entries than Db A.

What I need to do is search Db B for lines where the ID and year match those in Db A, then replace the Tritium data in Db A with that from Db B, which has the new, correct tritium dose data.

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to Combining Access database ...

in broad strokes, here is what you'll need to do:
an Update query is what you need to change the Tritium (wha-??) field value in A with the field value from the matching records in B
there is lots of good help and examples in Access Help.
i usually approach this problem by creating a Query and playing with it until it returns the records i want. you could possibly use the find unmatched wizard then saving the querying and modifying it to find matched instead. i think you will see when you try it.
then turn the Query into an Update query (do that with a button in the toolbar at the top in Query Design View)
also explore the Append and Create Table types of queries. maybe that will help you with your 'more records in b than a' question but not sure what you are asking...

Collapse -

by sgt_shultz In reply to

also play with Copy Table Structure Only. creates a blank database you could append to if you are trying to 'blend' your two dbs...

Collapse -

by demaio In reply to

Poster rated this answer.

Collapse -

by topmom5 In reply to Combining Access database ...

write a query to update the values in a from b, based on the id numbers, then append the rest of the data from b to a that didn't append.

Collapse -

by demaio In reply to

Poster rated this answer.

Collapse -

by charles.quamina In reply to Combining Access database ...

I agree with a combination of both answers 1 and 2. It's a good idea, as a matter of caution, to run a simple SELECT query based on the relationship of A.id and B.id and view/verify the results.
The next step is to turn that query into an UPDATE query that updates A.Tritium with values from B.Tritium.
If you want to consolodate the data from both A and B for purposes of a report you could always create a query based on a Full Join condition where all data and fields from both tables would be returned in the results. Note: NULLs will be returned in the fields that are not common in both tables.

Collapse -

by demaio In reply to

Poster rated this answer.

Collapse -

by demaio In reply to Combining Access database ...

This question was closed by the author

Back to Software Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums