I keep looking at this and I don\'t know why this CTE runs until timeout. Anyone see something I don\'t?
Note that InventoryTimeline.RecID is a sequential row number