Mohammad Arif

Mohammad Arif

  • NA
  • 8
  • 5.7k

I want to count left and right child in tree in sql server 205

May 31 2011 5:31 AM

My Table Syntax is below..
  
Id(Int)     [MemberID(varchar(20)]    [ParentID(varchar(20)]   [Position(char(1))]   [Name(varchar(50)]

1             A001                                        NULL                             L                                 ARIF
2             A002                                        A001                             L                                 SAM
3             A003                                        A001                             R                                 RAM
4             A004                                        A002                             L                                  ABC
5             A005                                        A002                             R                                  XYZ



my problem is how to count total left and right member of particula MemberId ---------- Table structure and column definition is above..  Thanks in Advance.

Answers (3)