I have a table with 2 fields 'Elements' & 'Parent'. These 2 fields represent a hierarchial child-parent relationship (like treeview).
eg.
Element ----Parent
1
1.1 -----------1
1.2------------2
1.1.1----------1.1
1.1.1.1--------1.1.1
The depth of the hierarchy is variable. I need a query that will identify all the descendants of any particular element, so for element 1.1 all the descendants are 1.1.1 & 1.1.1.1.
I can probably get this result using some kind of look up loop in vba but I am hoping that an SQL query can return the same thing.
eg.
Element ----Parent
1
1.1 -----------1
1.2------------2
1.1.1----------1.1
1.1.1.1--------1.1.1
The depth of the hierarchy is variable. I need a query that will identify all the descendants of any particular element, so for element 1.1 all the descendants are 1.1.1 & 1.1.1.1.
I can probably get this result using some kind of look up loop in vba but I am hoping that an SQL query can return the same thing.