Hi,
I'm trying to find, in my docbase, Virtual Documents which only have no-content children, i.e. placeholders that have not yet been populated. I don't need to look recursively down the structure, so the Virtual Documents the query would return could be at any level in the structure.
In my understanding of the Documentum data model, this would mean virtual documents which are parents of a set of documents in which there exists no instance where the content type is not null (i.e. no instance of contentless object).
However, the following query does not work:
SELECT
*
FROM
dm_document parent_doc -- Searching for documents
WHERE
parent_doc.r_is_virtual_doc = True and -- that are virtual documents
not exists (SELECT -- for which there exist no
c.r_object_id
FROM
dmr_containment c, dm_document d -- containment object
WHERE
parent_doc.r_object_id = c.parent_id and -- of which it's the parent, and
c.component_id = d.i_chronicle_id and -- whose child, (identified by the chronicle ID and
any d.r_version_label = c.version_label and -- any version label)
d.a_content_type is not nullstring and -- is not contentless and
d.r_is_virtual_doc = False) -- is not a VDoc itself
Can anybody help?
Thanks!
R.