Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Hierarchyid Travesal Expand / Collapse
Author
Message
Posted Friday, February 29, 2008 12:18 AM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
Comments posted to this topic are about the item Hierarchyid Travesal
Post #462197
Posted Friday, February 29, 2008 5:03 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 5, 2014 11:27 AM
Points: 2,670, Visits: 783
Ryerson has a cool picture of breadth first vs depth first traversal

http://www.ryerson.ca/~dgrimsha/courses/cps721/images/nBreadthFirst.gif

http://www.ryerson.ca/~dgrimsha/courses/cps721/nDepth.html

IS the breadth-first command available in SQL 2005?

with recursive itemlist(atitem,piece,qty,cost) AS
(select item_id,planning_item,1,0)
from titems
where item_id='AT1000000'
UNION ALL
SELECT item_id,piece,qty,qty*cost
From vInventory,tItems
where item_id=item_id)
Search Breadth First by item_id,Item_id
set order_column
SELECT piece,qty,cost from vInventroy
Order by Order_column;


Jamie
Post #462266
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse