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
 General SQL Server Forums
 New to SQL Server Programming
 help plz...

Author  Topic 

vedjha
Posting Yak Master

228 Posts

Posted - 2008-09-30 : 06:13:29
child Parent closing

1 Null 0
2 1 0
3 1 1
4 3 1
5 4 1
6 3 2
7 4 2
8 1 2
9 7 2
10 1 3
11 1 3
12 10 3
13 9 3
14 9 3
15 8 3


Question is: Find out those child who doesnot Sponsor any body in closing 3 . child belongs to closing: 0 to 2

plz.. help me..

Ved Prakash Jha

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-30 : 06:31:58
If you're using sql 2005 search for recursive CTEs in this forum. And if you're using SQL 2000 then refer below link for samplecode

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76414&SearchTerms=hierarchies
Go to Top of Page
   

- Advertisement -