DQL to retrieve docs linked to two locations of same cabinet


I need a DQL query to generate list of documents linked to two or more locations of same cabinet. For example, the document ABC is linked to /Record Centers/New York/.., /Record Centers/Chicago/.., /File Plan/xyz/.. and /Test/a123/... As this document is linked to same cabiner /Record Centers, this should show as a result. I want this query to be run on whole repository to get the list of documents.

Any help is greatly appreciated.





  • umesh.marripalli
    edited May 3, 2014 #2

    Can anyone please help me with the DQL query to accomplish this task.

  • Wiesnoepersad
    edited May 5, 2014 #3

    Try UNION

    DQL 1 (.. where FOLDER('/Record Centers/New York', descend)


    DQL 2 (.. where FOLDER('/Record Centers/Chicago', descend)


    DQL 3 ( ..where FOLDER( 'File Plan/xyz', descend)


  • carlosanchez-g2dHi
    edited May 5, 2014 #4

    Are you looking for the docs with more than one i_parent_id?

  • SELECT r_object_id, object_name, i_folder_id
    FROM pu_document (ALL)
    WHERE r_object_id IN
    (SELECT DISTINCT r_object_id FROM dm_dbo.dm_document_rv WHERE i_folder_id IS NOT NULLSTRING
    GROUP BY r_object_id HAVING COUNT(i_folder_id) > 1)