Making use of Jim's example, would something like this not work?:
Code:
SELECT
Company.Name,
Staff.Name
FROM Company RIGHT JOIN Staff ON Company.ID = Staff.CompanyID
GROUP BY Company.Name
To return a single record for each company that has at least one member of staff, along with the first member of staff's name.
or
Code:
SELECT
Company.Name,
Staff.Name
FROM Company LEFT JOIN Staff ON Company.ID = Staff.CompanyID
GROUP BY Company.Name
If you want company records returned when there are no staff.
Sort of thing.
Bookmarks