I run a pool league. I have a large table of played matches. The table consists of PlayerID, Date, Win/Loss, Match Info........
The table is sorted by most recent date at top (ie. descending order) I want to create a report which includes the most recent 5 matches from every player. I can get the info I want by using PlayerID as criteria and selecting Top 5, but I have to enter the PlayerID for each player. Not acceptable for 200+ players. I could not get criteria to accept a loop. Can anyone suggest a way to create a temp table with only last 5 matches for each player or some code to call the query in a loop from min to max player within a report.
The table is sorted by most recent date at top (ie. descending order) I want to create a report which includes the most recent 5 matches from every player. I can get the info I want by using PlayerID as criteria and selecting Top 5, but I have to enter the PlayerID for each player. Not acceptable for 200+ players. I could not get criteria to accept a loop. Can anyone suggest a way to create a temp table with only last 5 matches for each player or some code to call the query in a loop from min to max player within a report.