C
Carl Rapson
I have a table that stores the results of games played,
with the following fields:
Table: Games
------------
id - Autonumber
GameNo - Integer
Winner - Long, id of winner (from Teams)
Loser - Long, id of loser (from Teams)
Winning score - Integer
Losing score - Integer
Table: Teams
------------
id - Autonumber
Team Name - Text
This seems sufficiently normalized to me, since there will
always be a winner and loser in a game (I'm not worries
about ties) and so there shouldn't be any wasted space.
What I would like to do is produce a report like the
following:
Team Name #Played #Won #Lost
--------- ------- ---- -----
Team1 10 5 5
Team2 10 7 3
.... and so forth. Is this possible? I suspect there may be
a crosstab involved, but I'm confused about how crosstab
queries work and I haven't been able to figure it out.
Does anyone have any suggestions?
Thanks for any input,
Carl Rapson
with the following fields:
Table: Games
------------
id - Autonumber
GameNo - Integer
Winner - Long, id of winner (from Teams)
Loser - Long, id of loser (from Teams)
Winning score - Integer
Losing score - Integer
Table: Teams
------------
id - Autonumber
Team Name - Text
This seems sufficiently normalized to me, since there will
always be a winner and loser in a game (I'm not worries
about ties) and so there shouldn't be any wasted space.
What I would like to do is produce a report like the
following:
Team Name #Played #Won #Lost
--------- ------- ---- -----
Team1 10 5 5
Team2 10 7 3
.... and so forth. Is this possible? I suspect there may be
a crosstab involved, but I'm confused about how crosstab
queries work and I haven't been able to figure it out.
Does anyone have any suggestions?
Thanks for any input,
Carl Rapson