i suggest to use hierarchical query concepts

Cheers
/MR