how CTE help in solving herirecal routes


  • fr_city   to_city

    A              B

    A             C

    B            D

    C            D

    E             C

    A             D

    C             E


    above table shows routes between  different cities ,

    how i can get all possible  path  between city A and D , 


    1) A ----> D

    1)A-----> B------>D

    3) A----> C ------> D


    what i want to do is to give origin city and destination city ,

    Can with help of common table expression  we calculate all possible  ways to go  to destination 


    please help

    29. září 2011 6:38

Všechny reakce