3
Answers

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

Mohammad Arif

Mohammad Arif

13y
3.2k
1

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)