Custom Order By

  • Thread starter Thread starter Chad
  • Start date Start date
C

Chad

I have a quick question:

I have a query that returns a 'Club' field and a 'Total' field which is
grouped by 'Club'. There are only 3 clubs available, but I would like to
specify the order they returned. For example, I have clubs A, B, C and I
would like them to be returned in the order B, C, A.

For now I am creating a new field and associating a number with each club,
and then sorting based off of that field. Is there another way to do this?
Or is the way I am accomplishing it the only way?

Thanks everyone,
Chad
 
I have a quick question:

I have a query that returns a 'Club' field and a 'Total' field which is
grouped by 'Club'. There are only 3 clubs available, but I would like to
specify the order they returned. For example, I have clubs A, B, C and I
would like them to be returned in the order B, C, A.

For now I am creating a new field and associating a number with each club,
and then sorting based off of that field. Is there another way to do this?
Or is the way I am accomplishing it the only way?

Thanks everyone,
Chad

You are doing this the correct way.
No need to improve upon the wheel as you will only be going around in
circles. :-)
 
Chad said:
I have a quick question:

I have a query that returns a 'Club' field and a 'Total' field which is
grouped by 'Club'. There are only 3 clubs available, but I would like to
specify the order they returned. For example, I have clubs A, B, C and I
would like them to be returned in the order B, C, A.

For now I am creating a new field and associating a number with each club,
and then sorting based off of that field. Is there another way to do this?
Or is the way I am accomplishing it the only way?


There may be other ways, but I think the use of a sort order
field is probably the best way to go.
 
Basically that is the way you will want to do it.

I am not sure how you are associating the number with the club name.
Perhaps the good way of doing it that allows for easy expansion is to
have a table of club names and part of that table is the Sort sequence
you want.

Then in yourQuery add that table and sort by that number.

This may be what you are doing, but you were not too specific how you
were associating the number with the name.

Ron
 
Back
Top