devdept
asked on
groups and sub group levels. from the 1 table same column
groups and sub group levels. from the 1 table same column.
levelid groupname parentlevelid
1 Operation NULL
2 NOC 1
3 SOD 1
4 Network 2
5 Network Eng 2
6 Development 3
7 Application 3 2008-02-10 23:04:28.390 SOD
levelid groupname parentlevelid
1 Operation NULL
2 NOC 1
3 SOD 1
4 Network 2
5 Network Eng 2
6 Development 3
7 Application 3 2008-02-10 23:04:28.390 SOD
I'm not sure what the question is!
ASKER
Dear BrandonGalderisi:
I am using c1webgrid to display data for grouping
I have one admin and n level of subgroups in same table. How I use the following sample to my cenario.
Example :
Operations(main group)
Abc
Xyz
Pqr
Efg
123
321
i want this query in sql server 2005
i want to make a dynamic query to add groups or select groups and sub groups.
Regards
shams.
I am using c1webgrid to display data for grouping
I have one admin and n level of subgroups in same table. How I use the following sample to my cenario.
Example :
Operations(main group)
Abc
Xyz
Pqr
Efg
123
321
i want this query in sql server 2005
i want to make a dynamic query to add groups or select groups and sub groups.
Regards
shams.
Is this what you want?
select ParT.groupName, subT.GroupName
from YourTable ParT
join yourTable SubT
on ParT.levelId = sub.parentLevelId
ASKER
BrandonGalderisi:
i am using this query, from this its coming upto 3 levels, i want to display n levels.
SELECT BB.LavelName, B.LavelName, E.LavelName
FROM groupslevel e
INNER JOIN groupslevel AS B ON E.LevelParentID=B.levelID
INNER JOIN groupslevel BB ON B.levelparentID=BB.LevelID
i am using this query, from this its coming upto 3 levels, i want to display n levels.
SELECT BB.LavelName, B.LavelName, E.LavelName
FROM groupslevel e
INNER JOIN groupslevel AS B ON E.LevelParentID=B.levelID
INNER JOIN groupslevel BB ON B.levelparentID=BB.LevelID
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.