Hello Everyone and thank you in advance for the help.
I have setup a correspondance table that looks like this
| Old | New |
|---|---|
| A | B |
| B | C |
| A | D |
| C | D |
Of course this is a log of correspondance between one state to another at multiple points in time. I am trying to transform this data into a "usable format" by flattening out the relationships between old and new to get to something like this:
| Old | New |
|---|---|
| A | D |
| B | D |
| C | D |
Does anyone have any idea how to do something like this in SQL? Please keep in mind the iterations can run 7 levels deep. Thank you very much