Tag Info

New answers tagged

0

Well this worked for the given sample data but not the cycles scenario / may not work for a more complex data set. Thought I would post anyway as a starter for 10: DECLARE @t TABLE ( id1 INT, id2 INT ) INSERT INTO @t VALUES ( 1, 2 ), ( 1, 3 ), ( 3, 4 ), ( 3, 5 ), ( 6, 7 ) --( 1, 2 ), --( 2, 3 ), --( 3, 1 ) ;WITH cte AS ( ...



Top 50 recent answers are included