Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Recursive SQL query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-23 : 10:52:36
Stephen Young writes "I need to find the shortest path between two points. There is a game board where the spaces are joined to each other through a board table stating parent-child relationships. Is there a recursive SQL query that would allow us to put in a beginning and an ending point, and show us the patheway between the two. The setup is like this:
Space Table
SpaceID Int
Board Table
SpaceFrom Int <-- Foreign Key from Space Table
SpaceTo Int <-- Foreign Key from Space Table"
   

- Advertisement -