INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Query folders in a group

Query folders in a group

(OP)
Does anyone know the syntax to query folders in a group? I've tried a few and my query runs forever. I don't believe a have the correct join.

select d.name from dtree d, dtreeacl dc
where dc.rightid = /*the id of the group */
and d.dataid = dc.dataid

RE: Query folders in a group

I wrote this descriptively to help you, DTreeACL contains one row each for each ACL present in the Object.The last statement will show you what you are looking for
but I like to be less cryptic .If you join KUAF.ID to DCL.RightID you can then find the real name of user or group as well

--First enumerate the Individual dataid in a folder
select * from DTreeAncestors DTA where DTA.AncestorID=24276345 ;

--Get name etc by joing to DTREE enumerate the Individual dataid in a folder
select DT.Name,DT.DataID,DT.SubType from DTreeAncestors DTA ,DTree DT where DT.DataID=DTA.DataID
and DTA.AncestorID=24276345 ;

--For each DataID get a row of DtreeACL Info for each DataID it will have 4 stanadrd rows standing for User,Group,
--PA&System and any below the line ACL
select DCL.OwnerID, DCL.ParentID, DCL.DataID, DCL.RightID, DCL.[Permissions], DCL.ACLType, DCL.See, DT.Name,DT.DataID,DT.SubType
from DTreeAncestors DTA ,DTree DT ,DTreeACL DCL where DT.DataID=DTA.DataID
and DCL.DataID = DT.DataID and DTA.AncestorID=24276345 ;

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair
http://www.livelink.in

RE: Query folders in a group

(OP)
Thank you. Let me try this.

Cheryl

RE: Query folders in a group

(OP)
That just gives me subtype 142, I need all files which that group as access.

RE: Query folders in a group

The query I provided is not specific to subtype=142 it starts its processing from a container object.If your question is I have group called "My Secure Group" with a KUAF.ID=23456
then one can write it like this
Select * from DTreeACL where RightID=23456 ,this will give you all the Objects that has that Group applied
If you join it with DTree and with SubType=0 you will have folders that have it. Note these are the Direct ACL does not mean much as that is not how
LL determines how one gets access to an object as LL Knows if a user is seeing something because of the direct presence of an ACL or a Nested(computed) ACL.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair
http://www.livelink.in

RE: Query folders in a group

(OP)
That's it... thank you and thank you for the explanation. It helped with another query.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close