Forum OpenACS Q&A: Re: Extracting all 'node_id' in one branche

Collapse
Posted by Dan Wickstrom on
Try something like the following:

select n1.* from site_nodes n1,
       (select tree_sortkey from site_nodes where node_id = :branch_root_node) n2 
where n1.tree_sortkey between n2.tree_sortkey and tree_right(n2.tree_sortkey);