first i must admit that i\'m not very familiar with sql server\'s recursive CTE\'s but i think this is the best approach.
I have a table tabData. Its PK
tabData
Changing to:
INNER JOIN PreviousClaims parent ON parent.fiData = child.idData
Gave me the results you wanted.
You have the join backward.
Change this
INNER JOIN PreviousClaims parent ON parent.idData= child.fiData
to this