Subject Re: [firebird-support] Re: 2 inner joins on the same table
Author Pavel Menshchikov
Hello Ricardo,

>> >Yes, but it doesn't work. I get the error:
>> >
>> >Invalid token.
>> >Dynamic SQL Error.
>> >SQL error code = -104.
>> >Token unknown - line 6, char 1.
>> >INNER.
>>
>> It doesn't mean INNER is not an allowed keyword (although it is
R> optional,
>> since JOIN without LEFT, RIGHT or OUTER is an inner join by
R> nature!). It's
>> not a dialectal issue, either. It means something was missing in
R> the
>> preceding clause - in this case, the table alias for Match.
>>
>> Fix it as follows:
>>
>> select m.team1, m.team2, t1.name, t2.name from Match m
>> inner join Team t1 on m.team1 = t1.id
>> inner join Team t2 on m.team2 = t2.id;
>>
>> ./heLen

R> Good try, but it doesn't work. I don't know what's wrong. The error
R> message remains the same. Any other idea?
Tell us how do you execute the statement: some admin tool, your own
program (what FB access components do you use?), isql, etc.?

And according to the error message, line 6 contains the error. Could
you post your original SELECT statement?


HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com