update ratings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi People,
I have compiled new ratings (after a tennis match) by calculating a points
plus (for the winner) and minus (loser).My problem is that when I update the
winners' rating, Access re-calculates the losers', based on the winners NEW
rating. I feel I am stuck in a loop. (I have unchecked the cascade updates
box)
Please stop me going dizzy! Thanks in advance
 
Hi Lynn, thanks for taking the time. This is my first attempt with Access,and
Im still very novicey. Please be gentle!.
What I have is:-
1/a Player table including PlayerID, Rating.
2/a Results table inc. WinnerID, LoserID (both in PlayerID), Score
3/a NewRatings Query inc WinnerID, Player.Rating, LoserID, Player_1.Rating,
Score, Points, (calculated), WinnerNewRating (Player.Rating+Points),
LoserNewRating (Player_1.Rating-Points)
The points are calculated from the scoreline coupled with the difference in
the players original ratings.
Everything works fine right through the NewRatings Query, which says e.g two
players each rated 1000, A beats B, A's New Rating goes to 1015, B's to 985.
The trouble starts when I try to update the original ratings in the Player
table.
The winner goes to 1015 ok, but then Access re-calculates the points based
on this 1015 and makes the loser 986 before I can update with the 985. Can I
update the two figures simultaneously? Sorry to go at length.
Any thoughts appreciated










I need to update the Player table to the winner and loser's new ratings.
Hope this clarifies.
 
Dear Yorkie118:

By the way, I see that you are *already* being helped on what looks like
exactly the same question ("How to update these figures") by Gunny! And you
had posted the same question just a little earlier. So you've posted the
same question 3 times within one day. Well, by reposting that way, you now
have two people answering the same question - which means one of them will
be wasting time and effort. That's not cricket, and that may be why the
later post was ignored - people saw you were already getting help.

You might want to review the netiquette file..

http://www.mvps.org/access/netiquette.htm


Fred
 
Sorry Fred,as I say I'm new here, and certainly dont mean any disrespect. I
di receive a reply from Gunny, which I didn't fully understand, so posted
back further details. But several hours passed, and I thought nothing more
wasforthcoming. Again I can only apologise, and say I acted only out of
ignorance.
 
Hi Lynn, Hope this helps.

SELECT GetRatings.Winner, GetRatings.Player.Rating, GetRatings.Loser,
GetRatings.Player_1.Rating, Results.MatchScore, [Expectancy]*[KFactor] AS
Points, [Player.Rating]+[Points] AS WinnerNewRating,
[Player_1.Rating]+[Player.Rating]-[WinnerNewRating] AS LoserNewRating
FROM GetRatings LEFT JOIN Liklihood ON GetRatings.Diff =
Liklihood.Difference, K_Factor INNER JOIN Results ON K_Factor.MatchScore =
Results.MatchScore;
 
Lynn, I see from the SQL that this was a later effort. Instead of adding
Points to Winners Rating, and deducting same from Losers Rating, I tried:-
LosersNewRating= Winners old rating+Losers old rating - Winners new rating,
which should achieve the same end. (Winners old Rating is Rating.Player,
Losers old rating is Rating.Player_1, and Winners new rating is
WinnerNewRating.)
Thanks
 
Back
Top