EMC Documentum DQL整理(一)

 1.Get user

SELECT *  FROM dm_user  WHERE r_is_group = 0
 
2.Get Group
SELECT *  FROM dm_group  WHERE group_class = 'group'
 
3.Get File
SELECT * FROM dm_document( ALL) WHERE FOLDER('{0}')
SELECT * FROM dm_document( ALL) WHERE FOLDER( ID('{0}'))
 
4.Get Version
SELECT r_object_id,r_version_label  FROM dm_document( ALLWHERE i_chronicle_id = '{0}'  ORDER BY r_version_label  DESC ENABLE( RETURN_TOP 3)
 
5.Get Regular Document
SELECT r_object_id FROM dm_document WHERE FOLDER( ID('{0}')) AND (r_assembled_from_id = '0000000000000000' OR r_assembled_from_id IS NULL) AND (i_chronicle_id NOT IN ( SELECT i_chronicle_id FROM dm_document( ALL) WHERE FOLDER( ID('{0}')) AND (r_is_virtual_doc != 0 OR r_link_cnt != 0)))
 
6.Get Virtual Document
SELECT r_object_id FROM dm_document WHERE i_chronicle_id IN ( SELECT i_chronicle_id FROM dm_document( ALL) WHERE FOLDER( ID('{0}')) AND (r_is_virtual_doc != 0 OR r_link_cnt != 0))
 
7.Get Snapshot
SELECT r_object_id FROM dm_document WHERE FOLDER( ID('{0}')) AND r_is_virtual_doc = FALSE AND r_assembled_from_id != '0000000000000000' AND r_assembled_from_id IS NOT NULL
 
8.Get attribute of user types
SELECT dd.attr_name,df.parent_type FROM dm_foreign_key df, dmi_dd_attr_info dd WHERE (df.parent_type = 'dm_user' OR df.parent_type = 'dm_group') AND ANY dd.foreign_keys = df.r_object_id AND type_name = '{0}'
 
 

转载于:https://www.cnblogs.com/alex09/p/4371890.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值