F
Frank
I have posted the following question a while ago
How can one calculate the best, second best, third best ect, places in a
query using the swimmer time and then attach a value to the place to
determine
the points of each swimmer during the meeting [Ex fastest time = place 1 -
place 1 +11 =12 points, second fastest time = place 2 - place 2 + 8 = 12
points,
ext, applicable to all the times from fastest to slowest of a item
And received the following answer
I have Trace as my race table, and t_points as the rank to points lookup
table. tested and works with my kludged data under Access 2007
q_rank:
SELECT Trace.swimmer, 1-Sum([trace].[timesecs]>[trace_1].[timesecs]) AS
rank, Trace.timesecs
FROM Trace, Trace AS Trace_1
GROUP BY Trace.swimmer, Trace.timesecs;
SELECT q_rank.rank, q_rank.swimmer, q_rank.timesecs, t_points.points
FROM q_rank INNER JOIN t_points ON q_rank.rank = t_points.rank
ORDER BY q_rank.rank, q_rank.swimmer;
BUT
The q-rank return the following
YOU HAVE WRITTEN A SUBQUERY THAT CAN RETURN MORE THAN ONE FIELD WITHOUT
USING THE EXISTS WORD IN THE MAIN QUERY'S FORM CLAUSE. REVISE THE REQUEST OF
THE SUBQYERY TO REQUEST ONLY ONE FIELD
ANOTHER QUESTION
in the statement what is the difference between [trace] and [trace_1]
I would really appreciate your help as I am VERY new to Access and need this
to complete the Swimmeet database
Thank a lot
Frank
How can one calculate the best, second best, third best ect, places in a
query using the swimmer time and then attach a value to the place to
determine
the points of each swimmer during the meeting [Ex fastest time = place 1 -
place 1 +11 =12 points, second fastest time = place 2 - place 2 + 8 = 12
points,
ext, applicable to all the times from fastest to slowest of a item
And received the following answer
I have Trace as my race table, and t_points as the rank to points lookup
table. tested and works with my kludged data under Access 2007
q_rank:
SELECT Trace.swimmer, 1-Sum([trace].[timesecs]>[trace_1].[timesecs]) AS
rank, Trace.timesecs
FROM Trace, Trace AS Trace_1
GROUP BY Trace.swimmer, Trace.timesecs;
SELECT q_rank.rank, q_rank.swimmer, q_rank.timesecs, t_points.points
FROM q_rank INNER JOIN t_points ON q_rank.rank = t_points.rank
ORDER BY q_rank.rank, q_rank.swimmer;
BUT
The q-rank return the following
YOU HAVE WRITTEN A SUBQUERY THAT CAN RETURN MORE THAN ONE FIELD WITHOUT
USING THE EXISTS WORD IN THE MAIN QUERY'S FORM CLAUSE. REVISE THE REQUEST OF
THE SUBQYERY TO REQUEST ONLY ONE FIELD
ANOTHER QUESTION
in the statement what is the difference between [trace] and [trace_1]
I would really appreciate your help as I am VERY new to Access and need this
to complete the Swimmeet database
Thank a lot
Frank