Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2014
    Posts
    4

    Unanswered: How to retrieve all children of a parent node in sybase ASE

    I am having a table Employee which has employeeID and ManagerID. I would want to be able to drill down the tree structure from the ManagerID at the highest level and go down till the bottom of the tree. I understand that sybase does not support common table expression. Could you kindly suggest me ways of getting this information out when the levels of hierarchy is not known and will be different for different ManagerID's.

    I am guessing we might need a recursive procedure but how do i return this tree structure list from a procedure.

    I looked around similar questions on the same topic but was not able to get anything concrete. Any kind of help will be appreciated.

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Maybe this ms sql example can help
    How to show expanding hierarchies by using SQL Server

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •