> Hi,
> I asked this in the support list, but got no answer:
>
>
> I do not understand why
>
> set planonly;
> with recursive
> CTE_CNT1 as (select 0 as I
> from RDB$DATABASE
> union all select I + 1
> from CTE_CNT1
> where I < 9),
>
> CTE_CNT2 as (select I, 0 as J
> from CTE_CNT1
> union all select J * 10 + c1.I, c2.J + 1
> from CTE_CNT1 c1
> join CTE_CNT2 c2 on c2.J < 10)
>
> select I from CTE_CNT2;
>
> fails with:
> Statement failed, SQLSTATE = 42S22
> Dynamic SQL Error
> -SQL error code = -206
> -Column unknown
> -C2.J
> -At line 14, column 15
>
> while the similar
>
> with recursive
> CTE_CNT1 as (select 0 as I
> from RDB$DATABASE
> union all select I + 1
> from CTE_CNT1
> where I < 9),
>
> CTE_CNT2 as (select 0 as I, 0 as J
> from RDB$DATABASE
> union all select J * 10 + c1.I, c2.J + 1
> from CTE_CNT1 c1
> join CTE_CNT2 c2 on c2.J < 10)
>
> select I from CTE_CNT2;
>
> succeds with
>
> PLAN (CTE_CNT2 RDB$DATABASE NATURAL, CTE_CNT2 CTE_CNT1 RDB$DATABASE
> NATURAL, JOIN ())
I think, this is a bug.
Regards,
Vlad
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel:
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel