| toNode | fromNode | days | |---------------------------| | 1 | 12 | 80 | | 3 | 5 | 45 | | 4 | 6 | 54 | ...the toNode is the result and the fromNode gives you the result by adding the amount of days to the fromNode The only date that I have is a created date form another table that in this case will be from node now. Example (first row of 'datecalculation' table)

select createddate from nodes createddate = 01/01/2013 createddate = fromnode 12 fromNode 12 + 80 days = 22/03/2013toNode 1 now has this value and we in the datecalculation table where fromNode is id is 1 and use that to calculate the correlating toNode. Is there a way of traversing this table to get the results in a depth first algortihm manner? Is this possible in tsql? Many thanks in advance.