I have a Tasks table for example:
TaskTitle DueDate Person Manager
Report 3/28/15 John Dave
Inspection 4/10/15 Brian Shane
and a Contacts Table:
ID Contact Email Manager
1 John [email protected] False
2 Dave [email protected] True
3 Brian [email protected] False
4 Shane [email protected] True
And what I want to do is write a query like this:
PEmail MEmail TaskTitle
[email protected] [email protected] Report
[email protected] [email protected] Inspection
I can can get the query to select the PEmail or the MEmail, but not both together?
SELECT [Contacts].[Email], [Tasks].[TaskTitle]
FROM tasks
LEFT JOIN [Contacts]
ON [Tasks].[Person] = [Contacts].[Contact]
and
SELECT [Contacts].[Email], [Tasks].[TaskTitle]
FROM tasks
LEFT JOIN [Contacts]
ON [tasks].[Manager] = [Contacts].[Contact]
Is there a specific thing this is called? A multiple join or multiple select? I've been really stuck on this.