Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

sql querry WITH RECURSIVE in input table component

$
0
0
EDIT : Sorry, I did a mistake in the forum :(
Hi,

Can we do an WITH RECURSIVE querry in the input table component ?

Code:

with recursive rel_tree as (
  select col1, col2...
  from table
  where col1 is null
  UNION ALL
  select col1, col2, p.level + 1, ...
  from table t join rel_tree p
        on t.col1 = p.col1
)
select col1, ...
from rel_tree
order by col;

I tried this but the result in my final table it isn't the same than the result of my query execution in DB.

Thanks

Viewing all articles
Browse latest Browse all 16689

Trending Articles