• Great article, thanks. I really enjoyed going through that.

    I am looking for CTE's that will give me formulae for different predictive analysis routines.

    here is a slight coding problem, the first select in the following code should not have the "Union".

    -- Add an additional origin and destination node

    INSERT INTO #Edges

    UNION ALL SELECT '0', 'N', 15 -- ABS(CHECKSUM(NEWID())) % 100 + 25