Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Hierarchical Data

Hierarchical Data

Scheduled Pinned Locked Moved Database
databasehelpcsharpdata-structurestutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zafar Sultan
    wrote on last edited by
    #1

    I have a project (web application) where i have to show hierarchical data in form of a tree.For example A has two children B(left) and C(right). B has two children D(left) and E(right). C has two children F(left) and G(right) and so on... My problem is I dont know the exact SQl query to count the number of all the subsequent children for a particular member. Like "how many children A has to his left or right (depthwise)" also i need to show the initial 15 members in form of a tree. If I do recursing for every node using C# code(which I am using) and then filling the form and going on it is going to take forever. So if someone knows the proper SQL query please help me. Or if anyone has any idea?Please tell me.Thanks

    H 1 Reply Last reply
    0
    • Z Zafar Sultan

      I have a project (web application) where i have to show hierarchical data in form of a tree.For example A has two children B(left) and C(right). B has two children D(left) and E(right). C has two children F(left) and G(right) and so on... My problem is I dont know the exact SQl query to count the number of all the subsequent children for a particular member. Like "how many children A has to his left or right (depthwise)" also i need to show the initial 15 members in form of a tree. If I do recursing for every node using C# code(which I am using) and then filling the form and going on it is going to take forever. So if someone knows the proper SQL query please help me. Or if anyone has any idea?Please tell me.Thanks

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      I assume that you have searched for this, but on the off-chance that you've missed it, here[^] is a link to a relevant article. It also has some interesting links in it.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups