Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 16th, 2008, 03:15 AM
Pivot_Tables
Guest
 
Posts: n/a
Default recursive query - donot repeat the sub path that has already beendiscovered in the tree

Please follow the below link as this post is continuation from the
below post.

http://groups.google.com/group/comp....89589ccf38eb0a

Hi Guys,

I got into another issue with this. I want to know if I can break the
repeatation of the same parent child nodes in some other path. Here
is
one example of the data I am talking about.


AAA --BBB --FFF --GGG --HHH


Now the second path refers to one of the node in the above path and
it
is currently trying to recurse in the same sub path that was part of
some other path. see the example below.


AAA --CCC --DDD --III --FFF --GGG --HHH


Now, if you notice the III node was refering to FFF and because FFF
has child nodes it copied the same sub tree again. I donot want to
repeat the ( Parent --Child ) pair if it was already found
somewhere
else in some other path.


I tried using the DISTINCT of the Parent --Child, but its taking
too
long for query to return the data. Also, I kept the Locate function
so
that it does not go in infinite loop.


Is there a efficient way of retrieving the data without using
DISTINCT. I want to know if I could use the relationship table
created
so far as a subquery to not to process the duplicate sub paths.


Could you please guide me in the right direction.


Thanks a lot!!!!!
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles