LikeThisName
Vendor
i have a query that returns the names of people with a window office, most of these people are part of a Group A. A few of these window offices are shared by two people, but I only want to return one name per room.
I can return one name already incorporating vbscript to filter the array i build from the sql query, but for learning purposes would like to know how to do all of the following all on SQL Server.
i would like to return only one name per office number, if there are two names associated to the room i only want to return the name that is part of the highest group)
LikeThisName <- ?
I can return one name already incorporating vbscript to filter the array i build from the sql query, but for learning purposes would like to know how to do all of the following all on SQL Server.
i would like to return only one name per office number, if there are two names associated to the room i only want to return the name that is part of the highest group)
Code:
SELECT person.name, person.office_room_number, MapCoordsNames.class, MapCoords.group
FROM dbo.MapCoordsNames INNER JOIN
dbo.person ON person.office_room_number = MapCoordsNames.office_room_number INNER JOIN
dbo.MapCoords ON MapCoords.office_room_number
= MapCoordsNames.office_room_number
WHERE (person.Active_Employee = 1)
ORDER BY MapCoordsNames.class, person.office_room_number, MapCoords.group
LikeThisName <- ?