Subject | Re: 2 inner joins on the same table |
---|---|
Author | Ricardo |
Post date | 2005-03-09T18:21:40Z |
--- In firebird-support@yahoogroups.com, "Dan Wilson" <dwilson@d...>
wrote:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 6, char 1.
INNER.
wrote:
> On 3/9/2005 at 5:55 PM Ricardo wrote:are
>
> > I have a table Match in which each match has two teams. The teams
> > stored on the Team table. When I get one match, I need to get theforeign key references to id in Team
> > names of both teams.
> >
>
> assume table Team has two fields: id and name
> assume table Match has two fields: team1 and team2, which are
>Yes, but it doesn't work. I get the error:
> select team1, team2, t1.name, t2.name from Match
> inner join Team t1 on team1 = t1.id
> inner join Team t2 on team2 = t2.id;
>
> Is that what you want to do?
>
> HTH,
>
> Dan.
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 6, char 1.
INNER.