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)
 tree structure

Author  Topic 

srikhanth
Starting Member

3 Posts

Posted - 2004-09-22 : 17:09:16
tblGroup
PkID Desc GroupID
41 Points 0
165 Circuit 41
166 First 165
167 East 166
168 West 166
169 South 166
170 Test 41
171 Second 165
172 East 171
173 West 171
174 East 170
175 One 174
176 West 170
177 two 176


final output will be tree structure

Points
Circuit
First
East
West
South

Second
East
West
Test
East
One
West
Two



nr
SQLTeam MVY

12543 Posts

Posted - 2004-09-22 : 17:17:52
I've been looking for a chance to use this great site
http://www.fuckinggoogleit.com/search?query=sql+server+tree+hierarchy
Wait a few secs after going to it for your answer.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-09-22 : 17:40:23
i know... sigh

also here: http://www.seventhnight.com/treestructs.asp

Corey
Go to Top of Page

srikhanth
Starting Member

3 Posts

Posted - 2004-09-22 : 17:54:23
i am using ms-access


quote:
Originally posted by nr

I've been looking for a chance to use this great site
http://www.fuckinggoogleit.com/search?query=sql+server+tree+hierarchy
Wait a few secs after going to it for your answer.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-09-22 : 18:37:55
why would you do this in access... and isn't there a tree object?

Corey
Go to Top of Page

srikhanth
Starting Member

3 Posts

Posted - 2004-09-22 : 18:55:05
i am doing project using vb with ms-access

final output should be

Points
----- Circuit
--------------First
--------------------East
--------------------West
--------------------South
--------------Second
--------------------East
--------------------West
------Test
--------------East
--------------------One
--------------West
--------------------Two

quote:
Originally posted by Seventhnight

why would you do this in access... and isn't there a tree object?

Corey

Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-09-22 : 19:20:20
See
http://www.nigelrivett.net/RetrieveTreeHierarchy.html
It does what you want in t-sql, just convert it.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -