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.I<10
join CTE_CNT k on j.I = k.I

I would expect this to behave as

select i.I, j.I, k.I from CTE_CNT i
left join (CTE_CNT j
  join CTE_CNT k on j.I = k.I) on i.I = j.I and j.I<10

But it does not: It behaves like

select i.I, j.I, k.I from CTE_CNT i
join CTE_CNT j on i.I = j.I and j.I<10
join CTE_CNT k on j.I = k.I

Can someone explain this to me? Is this as intended or is this a bug?

Thanks alot! Thomas

-- 
Mit freundlichen Grüßen,

Thomas Beckmann
Diplom-Informatiker


Wielandstraße 14c • 23558 Lübeck
Tel +49 (22 25) 91 34 - 545 • Fax +49 (22 25) 91 34 - 604
Mail [email protected] <mailto:[email protected]>

ASSFINET-Logo

*ASSFINET Dienstleistungs-GmbH*
Max-Planck-Straße 14 • 53501 Grafschaft bei Bonn
[email protected] <mailto:[email protected]> • www.assfinet.de
<http://www.assfinet.de/>

Geschäftsführer: Dipl. Wirtschaftsinformatiker Marc Rindermann
Registergericht KoblenI HRB 23331

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist
nicht gestattet.

Reply via email to