Union query

fonzi

New member
Local time
Today, 17:26
Joined
Dec 8, 2008
Messages
5
I have two tables that are from separate mdb's that were supposed to be synchronised but there was an error and it didn't work.
One is a replica and the other is a design master. The design of the two tables is identical but there are some rows in the replica table that are not in the design master (it cannot be synchronised;long story).
There is a primary key field called ID in each table but this is randomly generated so I can't just sort each table by ID and then put the rows into the design master table that are in the replica but not in the design master.
Some of the randomly generated ID's may be the same in the design master table as they are in the replica table.
I need a union query to merge everything from the two tables but the problem is the ID's.
Any ID's (I mean ideas)?:)
 
If you're saying that the union query is eliminating the duplicates, try

UNION ALL

instead of

UNION
 
If you're saying that the union query is eliminating the duplicates, try

UNION ALL

instead of

UNION

If there are id's that are the same in both tables then the query will not work.
I need a query to find what is in the replica table that is not in the design master. A union query will not work as it will give me id's that are in both tables.
 
Okay; so it was afternoon, I hadn't had a Dr. Pepper yet, and I was getting cranky. :p :eek:
 
i'm serious. okay, maybe i was sleep-deprived but i thought it was very smooth indeed. made me smile. got my root beer in hand now...
 
Sorry for not replying sooner guys, was just too busy. I got the problem sorted by just copying and pasting the rows I needed from one table to the other.
I had more time than I thought.
 

Users who are viewing this thread

Back
Top Bottom