Subject | Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE |
---|---|
Author | Gabor Boros |
Post date | 2018-05-30T16:54:09Z |
2018. 05. 30. 16:51 keltezéssel, Mark Rotteveel mark@...
[firebird-support] írta:
and how works this recursive CTE.) Thank you very much Mark!
Gabor
[firebird-support] írta:
> Recursive CTEs always make my head hurt, but if I understand the intentI selected this solution and works as expected. (I will investigate why
> correctly, you should replace it with:
>
> select ti.id, t.parent_id
> from table1 t
> inner join table1 root on t.parent_id = root.id and root.parent_id is null
and how works this recursive CTE.) Thank you very much Mark!
Gabor