Olympic sorting of a query

  • Thread starter Thread starter Diego
  • Start date Start date
D

Diego

Hi All
i have a table like this:

Name Category Team Speciality
Ken A K1 100m
Ken1 A K1 100m
Bob A K2 100m
Pit A K2 100m
Rich A K3 100m
Dar A K4 100m
Mike A K4 100m
Jim A K3 100m

what i need is to have a query/report that select and order the Name one for
team
Ken A K1 100m
Bob A K2 100m
Rich A K3 100m
Dar A K4 100m
Ken1 A K1 100m
Pit A K2 100m
Jim A K3 100m
Mike A K4 100m

Practically the order is on the team name k1,k2,k3,k4 then k1,k2,k3,k4 and so
on.
Any suggestion are welcome
Thank you
 
There needs to be a field with data that indicates the grouping. Without
that, how would the query or report know that the groups should be {Ken, Bob,
Rich, Dar} and {Ken1, Pit, Jim, Mike} rather than {Ken1, Bob, JIm, Dar}, etc.?
So include another field called group, populate the field, and sort on that
first.

Otherwise, if the grouping is random, create a subroutine that randomly picks
a K1, then a K2, etc. without picking the same person again. Or create a
group field, choose groups randomly, and sort on group first. In any case,
you're missing a key piece of information or logic. HTH
 
Thank you for the suggestion
i will try

There needs to be a field with data that indicates the grouping. Without
that, how would the query or report know that the groups should be {Ken, Bob,
Rich, Dar} and {Ken1, Pit, Jim, Mike} rather than {Ken1, Bob, JIm, Dar}, etc.?
So include another field called group, populate the field, and sort on that
first.

Otherwise, if the grouping is random, create a subroutine that randomly picks
a K1, then a K2, etc. without picking the same person again. Or create a
group field, choose groups randomly, and sort on group first. In any case,
you're missing a key piece of information or logic. HTH
Hi All
i have a table like this:
[quoted text clipped - 24 lines]
Any suggestion are welcome
Thank you
 
Back
Top