drelefun
Technical User
- Apr 16, 2008
- 15
I’m trying to create a sports website to show sports results namely aussie rules football. I want to write a stored procedure to create the results for a separate team results against its opponents for the season. Essentially i have 2 tables
Game: game_id, date, home, away
Score: game_id, team_id, quater, goals, behinds
In the opposition column, I want it to show the opposition team which could be either the home or away team instead of having a home and away column. If its the opposition team’s home game i want to add a @ symbol in front of that result.
I also want the score to start with the team score first and then the oppositions score.
At the end of the day i’d like it to look like
DATE OPPOSITION RESULT MARGIN
25/4/08 Fremantle 101-90 11
2/5/08 @Sydney 88-77 11
I got no idea how to go about it and thought you guys could help.
Game: game_id, date, home, away
Score: game_id, team_id, quater, goals, behinds
In the opposition column, I want it to show the opposition team which could be either the home or away team instead of having a home and away column. If its the opposition team’s home game i want to add a @ symbol in front of that result.
I also want the score to start with the team score first and then the oppositions score.
At the end of the day i’d like it to look like
DATE OPPOSITION RESULT MARGIN
25/4/08 Fremantle 101-90 11
2/5/08 @Sydney 88-77 11
I got no idea how to go about it and thought you guys could help.