Re: Help rewriting subquery
Hi again,
This should produce the same results as your sub-query (you have id-parent links and nested sets in the same table?)
SELECT child.id, child.left_id, child.right_id, child.parent, parent.left_id, parent.right_id, count(parent_set.id)-1 as level
FROM taxonomy child, taxonomy parent, taxonomy parent_set
WHERE child.parent=parent.id AND child.left_id BETWEEN parent_set.left_id and parent_set.right_id
GROUP BY child.id ORDER BY child.left_id;
Chris
Subject
Written By
Posted
Re: Help rewriting subquery
April 27, 2005 10:09AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.