|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 8:12 AM
Points: 2,554,
Visits: 7,209
|
|
I have a situation with items that are related, but not really in a heirarchy ... more like parent to parent. As shown below, all the ODD numbers are related to each other equally so that '1' is related to '11' via the other entries. ie, 5 is related to 1, and 11 is related to 5, therefore 11 is related to 1.
And all the EVEN numbers are related to each other equally, so that '12' is related to '2' because 12 is related to 10, 10 is related to 8, and 8 is related to 2.
I need to consolidate related rows into 1 summary row (selecting oldest & newest dates), and looking for examples on the InterWebz, but not sure what keywords I should be looking for to describe this kind of relationship.
Item_A Item_B 5 1 6 4 7 3 8 2 9 7 10 6 10 8 11 5 11 9 12 10
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 4:43 PM
Points: 192,
Visits: 640
|
|
With the ODD numbers, how is 7,5,3 related. Did you miss 7 is related to five? thanks
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 11:22 AM
Points: 2,541,
Visits: 4,370
|
|
It's a tree or hierarchy, whatever you prefer. I guess, you will need to use some sort of recursive CTE. Hard to say anything more based on provided limited details.
_____________________________________________ "The only true wisdom is in knowing you know nothing" "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!" (So many miracle inventions provided by MS to us...)
How to post your question to get the best and quick help
|
|
|
|