Join 4 Access SQL queries

Hi

I have 4 very similar Access SQL queries that I need to join on the fields MO, AO, AO2, AO3.
The queries look as follows:
SELECT Performance.Date, Performance.[Machine operator] AS MO, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Machine operator] = People.[Operator COY];

SELECT Performance.Date, Performance.[Assistant operator] AS AO, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Assistant operator] = People.[Operator COY];

SELECT Performance.Date, Performance.[Assistant operator 2] AS AO2, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Assistant operator 2] = People.[Operator COY];

SELECT Performance.Date, Performance.[Assistant operator 3] AS AO3, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Assistant operator 3] = People.[Operator COY];
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

als315Commented:
What result you like to have?
Date, MO, AO, AO2, AO3, PhoneMO,  PhoneAO,  PhoneAO2,  PhoneAO3?
Or
Date, Operator, Phone?
0
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi
I'd like
Date, Operator, Phone

Thanks
0
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Actually would like to try both but can post a further question to get the latter.
Thanks very much for the help
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

als315Commented:
For first - change name of operator in queries to "Operator":
SELECT Performance.Date, Performance.[Machine operator] AS Operator, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Machine operator] = People.[Operator COY];

SELECT Performance.Date, Performance.[Assistant operator] AS Operator, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Assistant operator] = People.[Operator COY];

SELECT Performance.Date, Performance.[Assistant operator 2] AS Operator, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Assistant operator 2] = People.[Operator COY];

SELECT Performance.Date, Performance.[Assistant operator 3] AS Operator, People.Phone
FROM Performance LEFT JOIN People ON Performance.[Assistant operator 3] = People.[Operator COY];

And use union select:
SELECT * FROM Q1 UNION SELECT * FROM Q2 UNION SELECT * FROM Q3 UNION SELECT * FROM Q4;
where Q1-Q4 - your queries
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
als315Commented:
Second can be done in one query:
Add table People 4 times, make your links to different copies of table and select field Phone from proper copy of table.
0
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Excellent. Thank you very much!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.