Re: [SQL] Get A Tree from a table

2002-10-07 Thread Joe Conway
Scott Yaung wrote: > I like to do something like this:(build a tree from relationship) [snip] > How can i make it by sql , and sql functions > Thanks lot and regards. There have been quite a few discussions of this topic in the past, so I would suggest you search through the archives. In 7.3 (c

Re: [SQL] Get A Tree from a table

2002-10-07 Thread Josh Berkus
Scott, > NODES__ > ParentIDVarchar(20) > ParentType varchar(20) > ChildID varchar(20) > ChildType varchar(20) This looks difficult... mainly becuase, in your shema, a "parent" node can be its own child or grandchild, resulting in an endless loop. I

[SQL] Get A Tree from a table

2002-10-07 Thread Scott Yaung
I like to do something like this:(build a tree from relationship) I have a table like this NODES__ ParentIDVarchar(20) ParentType varchar(20) ChildID varchar(20) ChildType varchar(20) __ What in the table 'A1',