I have a basic query which lists the courses that each team member is currently attending. There is more than one row per person as many are attending more than one course. What I would really like to do is display each person once, and only display the course details for the course that takes up the most hours. For Example
PersonID, CrsCode, Hours
123 ABC1 26
123 DEF1 33
I would want to display this as;
123 DEF 33
Ive tried grouping on personID and using the Max of Hours, but this wont then display the Crs Code.
I know this is probably something simple! But its been a really long day!! Any suggestions??
PersonID, CrsCode, Hours
123 ABC1 26
123 DEF1 33
I would want to display this as;
123 DEF 33
Ive tried grouping on personID and using the Max of Hours, but this wont then display the Crs Code.
I know this is probably something simple! But its been a really long day!! Any suggestions??