sql server - SQL query to find the shortest route between 2 points -


i have table has 3 fields: origin, destination , distance.

how can write query find shortest route origin destination?

  origin     destination        distance  -----------------------------------------                b                 10    b             c                 20    c             e                 30    b             f                 5    f             e                 6 

for example want shortest route c f answer :

      c---->f c---->b b---->f 

in line comments made, i'd suggest take @ this: graph algorithms mapreduce , mapreduce links


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -