<?xml version="1.0"?>
<rss xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
							<channel><title>New Posts For Thread: Sql help pls</title><link>https://community.betfair.com/general_betting/go/thread/view/94082/26179477/sql-help-pls</link><description>I'm trying to join a match with the names of the two teams.  I'm not sure how to do this type of query.ieSelect * from matches,teams where matches.awayTeam= teams.teamId as awayTeamName and matches.homeTeam= teams.teamId as homeTeamNamehmm, but thats</description><item><title>thanks for the help, its sorted now.</title><link>https://community.betfair.com/general_betting/go/thread/view/94082/26179477/sql-help-pls?post_id=472638701#472638701</link><description>thanks for the help, its sorted now.</description><pubDate>Tue, 02 Nov 2010 10:37:28 -0500</pubDate></item><item><title>Try:SELECT ht.TeamName AS HomeTeam,       at.TeamName As AwayTeam,       m.*FROM Matches mJOIN Teams ht ON ht.TeamId = m.homeTeamJOIN Teams at ON at.TeamId = m.awayTeam</title><link>https://community.betfair.com/general_betting/go/thread/view/94082/26179477/sql-help-pls?post_id=472600869#472600869</link><description>Try:SELECT ht.TeamName AS HomeTeam,       at.TeamName As AwayTeam,       m.*FROM Matches mJOIN Teams ht ON ht.TeamId = m.homeTeamJOIN Teams at ON at.TeamId = m.awayTeam</description><pubDate>Tue, 02 Nov 2010 02:13:22 -0500</pubDate></item><item><title>You need to introduce two table aliases for the team tables:SELECT *FROM matches, teams AS t1, teams AS t2WHERE matches.awayTeam = t1.teamId AND matches.homeTeam = t2.teamId</title><link>https://community.betfair.com/general_betting/go/thread/view/94082/26179477/sql-help-pls?post_id=472600013#472600013</link><description>You need to introduce two table aliases for the team tables:SELECT *FROM matches, teams AS t1, teams AS t2WHERE matches.awayTeam = t1.teamId AND matches.homeTeam = t2.teamId</description><pubDate>Tue, 02 Nov 2010 01:49:01 -0500</pubDate></item><item><title>I'm kinda rusty at this stuff, but one way is to use a view.You'll have to look up the correct syntax.Create view myview as Select * from matches,teams where matches.awayTeam= teams.teamId as awayTeamName Select * from myview, teamswhere myview.homeT</title><link>https://community.betfair.com/general_betting/go/thread/view/94082/26179477/sql-help-pls?post_id=472599721#472599721</link><description>I'm kinda rusty at this stuff, but one way is to use a view.You'll have to look up the correct syntax.Create view myview as Select * from matches,teams where matches.awayTeam= teams.teamId as awayTeamName Select * from myview, teamswhere myview.homeT</description><pubDate>Tue, 02 Nov 2010 01:41:15 -0500</pubDate></item><item><title>I'm trying to join a match with the names of the two teams.  I'm not sure how to do this type of query.ieSelect * from matches,teams where matches.awayTeam= teams.teamId as awayTeamName and matches.homeTeam= teams.teamId as homeTeamNamehmm, but thats</title><link>https://community.betfair.com/general_betting/go/thread/view/94082/26179477/sql-help-pls?post_id=472594993#472594993</link><description>I'm trying to join a match with the names of the two teams.  I'm not sure how to do this type of query.ieSelect * from matches,teams where matches.awayTeam= teams.teamId as awayTeamName and matches.homeTeam= teams.teamId as homeTeamNamehmm, but thats</description><pubDate>Mon, 01 Nov 2010 23:49:20 -0500</pubDate></item></channel></rss>
