Hi,
I have a query that contains two fields that are used to calculate points from another table and add a new field in the query called GamePoints.
Here are the relevent entities:
qry_GameResults
PlayerID
Player Rank
GameID
GameTypeID
GamePoints
tbl_PosistionandPoints
GameTypeID
Posistion
Points
The idea is that the qry_GameResults, uses the GameTypeID and Player Rank fields as a crtieria for finding the Points. So if the Posistion in the table is the same as Player Rank and the GameTypeID in the table is the same as the GameTypeID in the query then the value of the points from the table can be found and used as a field in the query called GamePoints.
This is my rough attempt at writing it in SQL, but I dont think its right.
Any help would be appreciated.
Tom
I have a query that contains two fields that are used to calculate points from another table and add a new field in the query called GamePoints.
Here are the relevent entities:
qry_GameResults
PlayerID
Player Rank
GameID
GameTypeID
GamePoints
tbl_PosistionandPoints
GameTypeID
Posistion
Points
The idea is that the qry_GameResults, uses the GameTypeID and Player Rank fields as a crtieria for finding the Points. So if the Posistion in the table is the same as Player Rank and the GameTypeID in the table is the same as the GameTypeID in the query then the value of the points from the table can be found and used as a field in the query called GamePoints.
This is my rough attempt at writing it in SQL, but I dont think its right.
Code:
SELECT Points FROM tbl_PosistionandPoints
WHERE Posistion = Rank
AND GametypeID = GametypeID;
Tom