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
 Transact-SQL (2000)
 select grandparent

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-05-30 : 08:48:28
raj writes "id name parentid

1 a 2
2 b 3
3 c 4


for eg . when i give the id=1, i should get the grandparent name 'c'


what sql query i should pass"

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2005-05-30 : 10:21:06
is this for school?
Go to Top of Page

nathans
Aged Yak Warrior

938 Posts

Posted - 2005-05-30 : 13:37:13
read up:

http://www.sqlteam.com/item.asp?ItemID=8866
Go to Top of Page
   

- Advertisement -