I have two tables, one is a table of employee names, 176 records. The other is a table (with duplicates) of employee names (same format) and their locations (7943 rows).
From this answer i deduced i needed a left join to give me the rows from Table A only.
I was hoping the below would give me the original 176 rows back from Table A, each column with a value for location from Table B, else blank if not available, however it gives me 7601 rows which i cannot for the life of me understand:
SELECT e.[UniqueName], l.[location]
FROM [Employees] as e
left join Locations as l
on e.[UniqueName] = l.[UniqueName]
Even using a group by (which I'm not sure why this would be necessary given that I am asking only for whats in Table A) gives 172 rows even though each name in the Employees table is unique!