PaulBricker
Programmer
I have a database for our Track and Field coach. The result field in the Results Table is a text field that needs to hold information in a couple different formats. For Track events, the results field looks like
##:##.##
42:05.91 would be an example.
For Field events, the results field looks like
###'##.##
102'22.35 would be an example.
Now if you leave everything alone, the field sorts ascending correctly when ordering by MeetID and EventID. But the problem is we would like to see the Track events sorted Ascending and the Field events sorted Decending. I made two select queries, one for track and one for field, and sorted them in the correct order. Then I joined them together using a Union query but the results are less than stellar. I'm posting the SQL for the Union Query. I have tried all types of ORDER BY statements to no avail. Any thoughts on how to get this field sorted correctly would be appreciated.
Paul
##:##.##
42:05.91 would be an example.
For Field events, the results field looks like
###'##.##
102'22.35 would be an example.
Now if you leave everything alone, the field sorts ascending correctly when ordering by MeetID and EventID. But the problem is we would like to see the Track events sorted Ascending and the Field events sorted Decending. I made two select queries, one for track and one for field, and sorted them in the correct order. Then I joined them together using a Union query but the results are less than stellar. I'm posting the SQL for the Union Query. I have tried all types of ORDER BY statements to no avail. Any thoughts on how to get this field sorted correctly would be appreciated.
Code:
SELECT qryResultsField.MeetID, qryResultsField.Opponent, qryResultsField.Date, qryResultsField.EventID, qryResultsField.Event, qryResultsField.Athlete, qryResultsField.Result As MeetResult
FROM qryResultsField
UNION ALL Select qryResultsTrack.MeetID, qryResultsTrack.Opponent, qryResultsTrack.Date, qryResultsTrack.EventID, qryResultsTrack.Event, qryResultsTrack.Athlete, qryResultsTrack.Result As MeetResult
FROM qryResultsTrack;
Paul