AlexN
Registered User.
- Local time
- Tomorrow, 01:29
- Joined
- Nov 10, 2014
- Messages
- 302
Hi everyone again,
Ok that’s a tough one. I’m building a soccer league database for my local league. There are tblTeams, tblPlayers, tblRoasters, tblPeriods, tblRounds, tblMatches, and tables tblHomeGoals, tblAwayGoals for keeping track of every match’s goal scorers.
The way it is, everything works fine, I can keep track of team roasters for every period, keep track of matches’ results, can assign points won, can track scorers etc.
Problem appears when it comes to ranking, when there’s a points-tie among two (or more teams). You see, apart from total points won by every team, apart from goals balance, we here have a (rather stupid) rule : when everything else is the same we count points gathered in matches between the two (or more) teams, and then, the goals balance in these specific matches.
I really tried to transform this rule to database logic. Just can’t. Total failure. I mean how do I design a condition of points tie when ranking table (query in this case) is in the form of :
Issues that I face are:
I know that’s tough and I honestly don’t expect anyone to bother. But I’m addressing to the best in the business and I really have had a lot of help in the past. Any insight will be highly appreciated (again).
Thanks in advance
Ok that’s a tough one. I’m building a soccer league database for my local league. There are tblTeams, tblPlayers, tblRoasters, tblPeriods, tblRounds, tblMatches, and tables tblHomeGoals, tblAwayGoals for keeping track of every match’s goal scorers.
The way it is, everything works fine, I can keep track of team roasters for every period, keep track of matches’ results, can assign points won, can track scorers etc.
Problem appears when it comes to ranking, when there’s a points-tie among two (or more teams). You see, apart from total points won by every team, apart from goals balance, we here have a (rather stupid) rule : when everything else is the same we count points gathered in matches between the two (or more) teams, and then, the goals balance in these specific matches.
I really tried to transform this rule to database logic. Just can’t. Total failure. I mean how do I design a condition of points tie when ranking table (query in this case) is in the form of :
Team | Points |
TeamA | 10 |
TeamB | 8 |
TeamC | 8 |
TeamD | 8 |
TeamE | 7 |
TeamF | 5 |
TeamG | 5 |
TeamH | 4 |
Issues that I face are:
- How can I compare Points field values to create the condition, them being in the same table?
- How do I isolate the matches between these very teams and then search the matches between them and draw out the appropriate stats?
- Given all above, how can I pass those stats to a table (query) like the one above in order to finally sort correctly?
I know that’s tough and I honestly don’t expect anyone to bother. But I’m addressing to the best in the business and I really have had a lot of help in the past. Any insight will be highly appreciated (again).
Thanks in advance