mayur pandit

mayur pandit

  • 1.6k
  • 279
  • 21.5k

Get Heirarchy using sql server query

Jan 7 2019 12:45 AM
Kindly check below table. I want get hierarchy where memberID = memberID useing recursive query. Kindly help. thank you.
 MemberID   Name    Parentid
 1 Nancy Davolio 4
 2 Andrew Fuller 4
 3 Janet Leverling 4
 4 Margaret Peacock nul
 5 Steven Buchanan 3
 6 Michael Suyama 3
 7 Robert King 2
 8 Laura Callahan 2
 9 Anne Dodsworth 2
 10 abhijeet 8
 11 energia 4

Answers (2)