Its all unlimited.
Duane
-----Original Message-----
From: Alan Wolfe [mailto:awolfe dcshoes.com]
Sent: Tuesday, November 14, 2006 2:33 PM
To: aspnet-databases aspadvice.com
Subject: [aspnet-databases] RE: SQL Recursion
Hey Duane,
A question...does each node have a maximum number of
children it will
have or is that also unlimited?
-----Original Message-----
From: Duane Boudreau [mailto:duane sandybaynetworks.com]
Sent: Tuesday, November 14, 2006 9:26 AM
To: aspnet-databases aspadvice.com
Subject: [aspnet-databases] SQL Recursion
Is it possible to create a recursive query in SQLServer
2000?
I have a table that contains a parent/child record
relationship and I
want
to build a tree without client side processing.
ID Parent
1 Null
2 1
3 Null
4 2
5 1
6 Null
7 2
8 6
Needs to be sorted as
-1
- 2
- 4
- 7
- 5
-3
-6
- 8
This example only shows 3 levels of data, but the real data
can go 15+
levels. The solutions I have found online do not handle
unlimited
levels.
TIA,
Duane
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
|