Combine two tables of data into one query (1 Viewer)

Number11

Member
Local time
Today, 23:27
Joined
Jan 29, 2020
Messages
228
So i have two large tables of data - in fact linked excel spreadsheets that hold serial number for equipment one table hold xx manufacture and the other another xxx manufacture both tables have the sam field name i want to use

Manufacture_Date
Serial_Number
Last_ImpectionDate

need to have all the data in one new query so i can pull in this data using just the Serial Number but have just one pass against all data
 

Minty

AWF VIP
Local time
Today, 23:27
Joined
Jul 26, 2013
Messages
7,809
A union query is the answer.

Code:
Select "xxx" as Manu , Manufacture_Date , Serial_Number , Last_ImpectionDate FROM tableXXX

UNION

Select "yy" as Manu , Manufacture_Date , Serial_Number , Last_ImpectionDate FROM tableYY

Edit: Damn @plog has faster fingers.
 

MushroomKing

Registered User.
Local time
Today, 15:27
Joined
Jun 7, 2018
Messages
100
Plog is right.
You could make 2 (lets say A and B) queries for your 2 tables.
Then make a new query (C).
Now copy the SQL code from query A and B and put them into the SQL editor of C.

In between those 2 blocks of code, put the word UNION.

If you run your query, it will "merge" A+B.

Hope kinda makes sense.
 

Users who are viewing this thread

Top Bottom