[Firebird-devel] Bug with JOIN/LEFT JOIN?

2014-03-26 Thread Thomas Beckmann
I'm sorry for asking this question here: In firebird-support, I got 2 answers of people who where obviously as little sure than I whether the described behaviour is a bug or SQL standard compliant, so: Please consider the following example: with recursive CTE_CNT as (select 1 as I from

Re: [Firebird-devel] Bug with JOIN/LEFT JOIN?

2014-03-26 Thread Dmitry Yemanov
26.03.2014 10:44, Thomas Beckmann wrote: Please consider the following example: with recursive CTE_CNT as (select 1 as I from RDB$DATABASE union all select I + 1 from CTE_CNT where I 20) select i.I, j.I, k.I from CTE_CNT i left join CTE_CNT j on i.I = j.I and j.I10 join CTE_CNT k on j.I

Re: [Firebird-devel] Bug with JOIN/LEFT JOIN?

2014-03-26 Thread Thomas Beckmann
In fact, this behaves as: select i.I, j.I, k.I from ( CTE_CNT i left join CTE_CNT j on i.I = j.I and j.I10 ) join CTE_CNT k on j.I = k.I and this is not a bug. You should be writing: select i.I, j.I, k.I from CTE_CNT i left join CTE_CNT j on i.I = j.I and j.I10 left join CTE_CNT k