I need to search my hierarchy to return all nodes that are above or equal to any node returned in a sub-query.
given table: H
Child | Parent
A1 | A
A2 | A
A1b | A1
A2a | A2
A2b | A2
B1 | B
B3 | B
B1c | B1
B3a | B3
Sub-query returns:
A2a
A2b
B3
I need a query that uses the results of the sub-query to return.
A
A2
A2a
A2b
B
B3
I've been trying to use the query from this SO questionto work it out, but no luck so far.