Subject Re: Recursive lookup
Author nols_smit
> I don't quite get what you're trying to do, I'll guess, but feel free to reformulate your problem if my guessing is wrong. My guess is that you're trying to do, is to traverse two trees and join them together.


Thanks, you saved my day!

To explain what I use this select query for:

It's about a typical project (in this case about Derelict and Abandoned mines in South Africa) where you have activity threads (thread type classified by using a tree-structure - Progress_Type_ID linked to the the tree-structure) describing what the team members are busy with and what they completed. Think about a typical web forum (such as this one) where you ask a question under a topic, someone reply and you explain etc. till the thread dies a natural death.

In my web application, users may load maps, documents etc. and then any node of the thread my be linked to one or more pre-loaded documents.

Also the progress activity threads may be displayed in a web grid and printed as a proper formatted document. I use the ALevel variable in the query to do the indenting (  for indents in the browser and a few blank spaces in the ReportBuilder report - HTML or pdf).

Typical these kind of projects carry on over several years or even decades. Team members come and go. Hopefully this web application will capture the memory of the history of the project's activities.


Nols Smit