EMC Documentum DQL整理(二)

 

1.Get file extension
SELECT dos_extension  FROM dm_format  WHERE name IN ( SELECT a_content_type  FROM dm_document( ALLWHERE r_object_id = '{0}')
 
2.Get content path
SELECT set_file FROM dmr_content WHERE r_object_id IN( SELECT i_contents_id FROM dm_document( ALL) WHERE r_object_id = '{0}')
 
3.Get unique parent folder
SELECT fr.r_folder_path FROM dm_sysobject s, dm_sysobject_r sr, dm_folder_r fr WHERE s.i_is_deleted = 0 AND sr.i_position = -1 AND fr.i_position = -1 AND sr.r_object_id = s.r_object_id AND fr.r_object_id = sr.i_folder_id AND s.r_object_id = '{0}'
 
4.Get content in Snapshot
SELECT * from dm_assembly WHERE book_id = '{0}' 
 
5.Get content in Virtual Document 
SELECT *  FROM dm_sysobject  IN  DOCUMENT  ID('{0}')  DESCEND
SELECT object_name, r_object_id as objectid, PARENT, DEPTH FROM dm_sysobject  IN DOCUMENT ID('{0}') DESCEND USING ASSEMBLIES
 
6.Get user in group
SELECT i_all_users_names FROM dm_group  WHERE group_name = '{0}'
 
7.Get role
SELECT group_name FROM dm_group WHERE group_class = 'role'​​
 
8.Get subtypes
SELECT name FROM dm_type WHERE super_name = '{0}'
SELECT r_type_name FROM dmi_type_info WHERE ANY r_supertype IN ('{0}')
 
9.Get all attribute
SELECT attr_name,label_text FROM dmi_dd_attr_info WHERE is_searchable = 1 AND type_name = '{0}'
 
10.Get non-inherited attribute of a custom type
SELECT attr_name FROM dmi_dd_attr_info WHERE type_name = '{0}' AND attr_name NOT IN ( SELECT attr_name FROM dmi_dd_attr_info WHERE type_name = '{1}')
 
 
 
 
 
 

你可能感兴趣的:(document)