Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find all Groups and Parent Groups of a user. 1

Status
Not open for further replies.

DilipN

Programmer
Jan 28, 2005
17
US
Dear All ,

How do i find the hirarchys of a groups of a user.
say for example "Dilip" user blongs to Group "authUsers"
but "authUsers" group is again a subset of someother groups, So how do i find all these hirarchys
From below Example i need to get all the groups information.

Dilip (User)
Group1 Group2
Group1Parent Gr2Parent
DefaultGroup


Thank You in Advance

 
Here's one LR that we use it is titled.It is Oracle specific when you use the connect by clause.For SQL server you may have to adjust.
Find All Groups for a User without Group Nesting
Settings for the LR
UserInput should be livelink user
or replace %1 with the id of the user who you wish to look up in straight sql.In the sql we eliminatae projects so that is why you see the <> coordinators etc
Code:
select name from kuaf where name <> 'Coordinators' and name <> 'Members' and name <> 'Guests' and id in (select id from kuafchildren where childid = %1) order by name
the below sql will give you all groups for the particular user with nesting included
Find All Groups for a User
Code:
select name from kuaf where id in (select id from kuafchildren start with childid = %1 connect by prior id = childid) order by name
Please try to obtain a schema document and it will have an ER diagram

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Thank You very much for your response.

I will modify queries to support SQL Server , but i got an idea now, thank you once again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top