So right now I have a query that fetches all the information I need from one table. Now I need to add a field that will fetch data from another table, the problem is that the data in the second table may not have an entry for a given ID in the first table. This results in my query returning only those who have entries in both tables. What Im looking for is to take the original query and simply add a field to it, if the persons ID has no entry in the second table I want the query to output null or 0 as this field on the record. Heres my original SQL statement:
Code:
SELECT [Most Recent Performances Per Person].ID, [Most Recent Performances Per Person].[Most Recent Date], Performance.Logged, Performance.Score, Names.[Full Name], [Warehouse Info].Hours
FROM ([Most Recent Performances Per Person] INNER JOIN (Performance INNER JOIN [Warehouse Info] ON Performance.ID = [Warehouse Info].Alias) ON ([Most Recent Performances Per Person].[Most Recent Date] = Performance.Date) AND ([Most Recent Performances Per Person].ID = [Warehouse Info].Alias)) INNER JOIN [Names] ON (Performance.ID = Names.Alias) AND ([Warehouse Info].ID = Names.ID)
WHERE ((([Warehouse Info].[Position Title])="Inventory Control Clerk"))
GROUP BY [Most Recent Performances Per Person].ID, [Most Recent Performances Per Person].[Most Recent Date], Performance.Logged, Performance.Score, Names.[Full Name], [Warehouse Info].Hours;