December 15, 2006 at 7:58 am
hi
i have a hierarchical structure, a graph
i need to walk on it ( scan it )
ensuring that i pass just one time
over the same node ( row )
using a CTE for this graph
___ C_________ D _
/ \ \
A \ F
\_____ B ______ E __/
i get ( from left to right precedence order )
A, B
B, E *
E, F *
A, C
C, B
B, E --> repeated *
E, F --> repeated *
C, D
D, F
i tried with an additional "left join" inside the CTE
in order to filter scanned nodes ,
but the command supports just ONE join to the recursive expression
i know that i can use a DISTINCT outside the command
but what i'm trying to do, is avoiding
to scan scanned paths again and again
how can i make it work ?!
thanks !
--
atte,
Hernán
December 15, 2006 at 8:00 am
Please do not cross-post, we monitor all boards.
Finish this thread here :
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=149&messageid=330820
Consider this thread closed.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply