perrygascoine
New member
- Local time
- Today, 14:39
- Joined
- Apr 28, 2009
- Messages
- 3
I have a table called team which contains the following fields...
team_id [autonumber]
team [text]
There are 46 teams each with their own team_id.
I have a table called games and in this table there are many fields. Two of the fields are called Home_id [number] and Away_id [number] which references the ids from the team table.
Now here is the issue I have....
How do I write a query that can show me the names of the teams. For example I can get the query to show me this...
Game1 1 vs 7
What I want is for it to show me....
Game 1 Chelsea vs Barcelona
Chelsea would be team 1 and Barcelona team 7 in the team table
The bit I am confused on is that from the team table the team could go into the games table in either the home_id column or the away_id column.
I am sorry if this is not very clear. I can send the db to someone if that helps....
Perry
team_id [autonumber]
team [text]
There are 46 teams each with their own team_id.
I have a table called games and in this table there are many fields. Two of the fields are called Home_id [number] and Away_id [number] which references the ids from the team table.
Now here is the issue I have....
How do I write a query that can show me the names of the teams. For example I can get the query to show me this...
Game1 1 vs 7
What I want is for it to show me....
Game 1 Chelsea vs Barcelona
Chelsea would be team 1 and Barcelona team 7 in the team table
The bit I am confused on is that from the team table the team could go into the games table in either the home_id column or the away_id column.
I am sorry if this is not very clear. I can send the db to someone if that helps....
Perry