Category: DQL
Folder related queries
Unlink folders:update dm_folder object unlink ‘/Cabinet/Folder1/Folder2/…./Parent Folder’ where r_object_id = ‘0bxxxxxxxxxxxxxx’ List folder path and all documents in given path select distinct dm.r_object_id, dm.object_name, dm.a_category, dm.r_creation_date, dm.r_modify_date, dm.r_object_type, f.r_folder_path from dm_document dm, dm_folder f where FOLDER(ID(‘0b01bd6f805353a4’), DESCEND) AND dm.r_object_type in(‘w_doc’,’w_media’) AND f.r_folder_path like ‘%/My Location%’ AND dm.i_folder_id = f.r_object_id ORDER by f.r_folder_path ENABLE (ROW_BASED) Content…
DQL hints
1. RETURN_TOP N This hint limits the number of rows that a query returns. If you are not interested in seeing all the rows but only the top five (for example), use this code: SELECT user_name FROM dm_user ENABLE (RETURN_TOP 5) 2. OPTIMIZE_TOP N This hint directs the database server to return the first n…
Deleted content
queries related to deleted content. Find Deleted Content Find all the deleted content in the repository. This works well as long as the dm_Clean job has not run. A technique for undeleting content will be the subject of a future post. select * from dmr_content where any parent_id is NULL and content_size > 0 order…
Workflow DQL
select distinct xxx_atrb1, due_date, xxxx, task_state, name from xxx_custom_folder, dmi_queue_item, dmi_package, dm_workflow, dm_process, dmi_workitem where due_date >= date(’03/01/2020′) and due_date <= date(’04/01/2020′) and dmi_queue_item.router_id=dmi_package.r_workflow_id and dm_workflow.r_object_id=dmi_queue_item.router_id and dm_workflow.r_object_id=dmi_workitem.r_workflow_id and dm_workflow.process_id=dm_process.r_object_id and task_name like ‘%Custom Task Name%’ and ANY dmi_package.r_component_id = cms_custom_folder.r_object_idorder by name; find by date & finished ones: select distinct cms_custom_id, cms_processing_type, cms_custom_date, cms_task_due_date, due_date, cms_pkg_custom_location, task_state, name from cms_custom_folder, dmi_queue_item, dmi_package, dm_workflow,…
Counting DQL
queries to count Number of documents created:select datetostring(r_creation_date,’mm-dd-yyyy’) as creation_date, count(*) as document_count, r_object_type from dm_document where r_creation_date >=DATE(TODAY)-7 group by datetostring(r_creation_date,’mm-dd-yyyy’), r_object_type Number of folders created:select datetostring(r_creation_date,’mm-dd-yyyy’) as creation_date, count(*) as folder_count from dm_folder where r_creation_date >=DATE(TODAY)-7 group by datetostring(r_creation_date,’mm-dd-yyyy’) Number of workflows created:select datetostring(r_start_date,’mm-dd-yyyy’) as wf_start_date, count(*) as workflow_count from dm_workflow where r_start_date >=DATE(TODAY)-7 group…
Very useful DQL
DQL is Document Query Language for Documentum, which is a content management system used to create, manage, deliver, and archive all types of content. Some useful DQLs are : · Query to list objects having duplicate names select object_name, count(*) FROM dm_document group by object_name having count(*) > 1 order by object_name · Query to find checked…
User & Group Related DQL Queries
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem
Object related DQL queries
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem