There isn't a way to achieve this directly in standard SQL. Oracle has the "start with", "connect by" syntax and that supports it through "level".
Alternatively, if you can remodel your data you could instead use nested sets: http://en.wikipedia.org/wiki/Nested_set_model
John Pickup
2010-10-13 11:41:21