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)
 sql select

Author  Topic 

rahul123
Starting Member

8 Posts

Posted - 2006-06-04 : 21:26:28
i have a table like this

group_id group_name main_group_id
------------------------------------
1 casinos 0
2 hotels 0
3 resorts 1
4 travels 3

what this table does is, it allows nested groups. so each group can be under another group. like travels is a subgroup under resorts, and resorts under casios. so when i edit casinos whose group_id is 1, I should get hotels (group_id =2) i.e (1,2) combination and for hotels I should get (2,1),2,3) and (2,4).
I am trying to do it in stored procedure. So this stored procedure expects a group_id and returns a collection of group_id's. Thanks in advance for the help.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-04 : 21:57:55
Duplicate post of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67214


KH

Go to Top of Page
   

- Advertisement -