July 5, 2006 at 11:40 pm
I have the following table...
============================
Code nvarchar(10)
Name nvarchar(50)
ParentCode nvarchar(10)
============================
for the following data...
Code Name ParentCode
001 Sam NULL
002 Mac 001
Now i want to get all childrens,children's childrens and so on against a code. Please help me to write a stored procedure or SQL(will be called from VB by ADODB.Recordset) to get this.
July 6, 2006 at 12:59 am
Hi,
Have a look at this article on how to expand a hierarchy. Hopefully that should help.
http://support.microsoft.com/default.aspx?scid=kb;en-us;q248915
July 7, 2006 at 11:41 pm
This works! Thank you.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply