Wednesday, June 17, 2009

DQL Tips

To display all available cabinets/folders/documents for a particular login user

select FOR READ * from dm_document where i_cabinet_id in (select r_object_id from dm_cabinet)

Always remember this and create your queries on the basis of this only

1, for None
2, for Browse
3, for Read
4, for Relate
5, for Version
6, for Write
7, for Delete

So your query can be:-

SELECT * FROM dm_document WHERE acl_name IN (SELECT object_name FROM dm_acl WHERE ANY r_accessor_permit > 3) AND ANY i_folder_id in (SELECT DISTINCT r_object_id FROM dm_folder WHERE acl_name IN (SELECT object_name FROM dm_acl WHERE ANY r_accessor_permit > 1))

I got this query as a response to the question in posted in DocumentumGyan

For more DQL Tips:

http://documentumgyan.blogspot.com/2008/12/dql-tips.html

No comments:

Post a Comment