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. General Programming
  3. Visual Basic
  4. How do i handle Group Hierarchy?

How do i handle Group Hierarchy?

Scheduled Pinned Locked Moved Visual Basic
helpquestiondatabasesql-server
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.
  • R Offline
    R Offline
    r_mohd
    wrote on last edited by
    #1

    Hi all kindly help me to handle the followings. 1)I have Created a Group Name MasterGroup 2)Created an other Group Name ChildGroup Under MasterGroup 3) Created an other Group Name ChildGroup_A Under ChildGrup Doing like above i have created a Group and under Group hierarchy say up to 6 step deep. Now i have Created some account using group and under group. like:- Id Name UnderGroup 1 abc MasterGroup 2 Bzx ChildGroup 3 Kml ChildGroup 4 Axv ChildGroup_A Up to this there is no problem, But i want to fetch Records group wise. I want result using following sql statements Select * from Tablename where UnderGroup = 'MasterGroup' in response it will show me all records having under group mastergroup and the records having relation with mastergroup. similarly when i use following sql statement Select * from tablename where groupname='Childgroup' in response it will show me only records having the groupname childgroup and records having relation upto Childgroup. I am working in vb2005 and mssql. kindly send me code if posible. a help would be highly appreciated. Thanks rm

    rmshah Developer

    H 1 Reply Last reply
    0
    • R r_mohd

      Hi all kindly help me to handle the followings. 1)I have Created a Group Name MasterGroup 2)Created an other Group Name ChildGroup Under MasterGroup 3) Created an other Group Name ChildGroup_A Under ChildGrup Doing like above i have created a Group and under Group hierarchy say up to 6 step deep. Now i have Created some account using group and under group. like:- Id Name UnderGroup 1 abc MasterGroup 2 Bzx ChildGroup 3 Kml ChildGroup 4 Axv ChildGroup_A Up to this there is no problem, But i want to fetch Records group wise. I want result using following sql statements Select * from Tablename where UnderGroup = 'MasterGroup' in response it will show me all records having under group mastergroup and the records having relation with mastergroup. similarly when i use following sql statement Select * from tablename where groupname='Childgroup' in response it will show me only records having the groupname childgroup and records having relation upto Childgroup. I am working in vb2005 and mssql. kindly send me code if posible. a help would be highly appreciated. Thanks rm

      rmshah Developer

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

      Firstly it is not very clear what it is that you want to do. Nor is there any mention of what errors or results, if any, you are getting when you try the SQL statements you have shown in your post. However, one thing springs to mind, given that you mention grouping. Have you looked at the GROUP BY clause of SQL?

      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