473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Merging two identical Access tables

I know this question has been asked many times before but I can't find an answer that fits my data!

I have two Access databases. The tables in each have the exactly the same fields except for one (which was added into the tables in the second database). Thye do have different records.

I want to merge the records from the tables from in the first database into the tables in the second. Other answers have suggested merging the tables in a query in order to view data from both but in my situation I have a lot more data to enter before I even think about viewing output!

Any suggestions would be much appreciated.

Mel
Nov 22 '06 #1
1 3381
nico5038
3,080 Expert 2GB
You'll first have to think of how the merge will have to take place.
Let's assume you have TableA and TableB and we also assume you have a unique identifier as key.
Then on the key level we can have 3 situations:
1) Keyvalue only in TableA
2) Keyvalue only in TableB
3) Keyvalue match
In case 3 we have an additional situation:
a) Other fields are identical
b) Other field(s) are different.

Using a UNION like
select *, "" as ExtraField from tableA
UNION
select * from tableB;

Will give in situation a) only one row and:

select *, "" as ExtraField from tableA
UNION ALL
select * from tableB;

Will give in situation a) two identical rows.

So some stuff to think about and inform me what you need in what situation.

Nic;o)
Nov 22 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Ike | last post by:
Suppose I have a relational database, called "BranchA." I have a second relational database, of identical structure to BranchA, but with different data, and this one is called BranchB. Can I...
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
1
by: svdh | last post by:
I have posed a question last saturday and have advanced alot in the meantime. But I am still not there Problem is that I try to merging various fields from various tables in one document in Word...
3
by: Kirsty Ryder | last post by:
Hi I have two tables containing largely unrelated data. Eventually I want a report that lists the contents of each table simultaneously in date order as it were. I think this is better explained...
1
by: lussierj | last post by:
Hello, I'm pretty new to this Database thing and I'm hoping someone can lend me a hand. I have an Access Database with two tables that I imported from an old database. I have set them up so that...
2
by: Piotr | last post by:
Hi, I have fact tables like following: Sales_2003 Sales_2004 Sales_2005 Sales_2006 As Sales 2006 is deleted and reloaded every day I do not merge all tables every time by executing SELECT...
3
by: Ralph Smith | last post by:
I have two identical databases on two different servers and I need to add the data in tables from one server to the tables in the other server. Is there a way to do that in mysql? thanks, Ralph
9
by: karenjfrancis | last post by:
I have 4 Access databases, all with the same data model but different data. I want to build a front end that brings all of the data in the 4 databases together into one. Assuming my table of...
1
by: Big X | last post by:
I have already achieved this in access and was trying with straight SQL earlier I would just like to know what I'm doing wrong in sql or what syntax I'm missing. I have three tables with identical...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.