19 Replies Latest reply: Jun 9, 2016 9:41 AM by Stefan Wühl RSS

    Finding the shortest route between two paths

    vivek Moningi

      Hi Guys,

       

      I have a table that is having the train information like train no , train name, source station name, destination station name, distance

      the table looks like this:

      Train No    Train Name       Source Station Name      Destination Name    Distance

      -------------------------------------------------------------------------------------------------------------- 

           1               ABC                           A                                   B                         10

           2               CDE                           B                                   E                         30

           3              EFG                            E                                   D                         40

           4               HIJ                             E                                   F                         20

           5               KLM                           B                                   D                         10

       

      what I need is if I select Source Station : A and Destination : D then it should give the me list of all the train numbers, I need to connect to reach to the destination using shortest distance .

       

      For example: from  A To D : A->B->D = 20 then the train no will be 1,5

                           2:    A->B->E->D= 80 then the train numbers will be 1,2,3

       

      This is what I need , it would be great if anyone can help me finding the solution

       

       

      Thanks,

      Vivek