M
Mark
Hi Folks
I have a classic child parent relationship within the same table where an
unlimited number of levels is possible (theoretically). I have front-end
code that recursively populates a tree control by getting the children of
each node etc. etc. This makes potentially hundreds of calls to the backend.
What I would like to do (as I think it may be more efficient) is create a
single recursive stored procedure that returns all records in lineage (text
description) order, i.e. top level first, then the first child, its children
and so forth... I could then construct the tree by walking through the data
in a single pass - I hope )
Is this possible or is there a better / more appropriate way to achieve the
same thing?
I am trying to avoid multiple calls to the backend and at the same time
migrate the front end code to the sql server...
Thanks very much
Mark
I have a classic child parent relationship within the same table where an
unlimited number of levels is possible (theoretically). I have front-end
code that recursively populates a tree control by getting the children of
each node etc. etc. This makes potentially hundreds of calls to the backend.
What I would like to do (as I think it may be more efficient) is create a
single recursive stored procedure that returns all records in lineage (text
description) order, i.e. top level first, then the first child, its children
and so forth... I could then construct the tree by walking through the data
in a single pass - I hope )
Is this possible or is there a better / more appropriate way to achieve the
same thing?
I am trying to avoid multiple calls to the backend and at the same time
migrate the front end code to the sql server...
Thanks very much
Mark