Here is how to get a count of all the documents in a cabinet by folder:
select count(*), f.r_folder_path from dm_document d, dm_folder f
where d.i_folder_id = f.r_object_id and folder('/CABINET_NAME', descend)
and f.r_folder_path is not nullstring
group by f.r_folder_path
enable(row_based)
Leave a comment