Products | Versions |
---|---|
TIBCO MDM | - |
Not Applicable | - |
Resolution:
The following SQL statement can be used to retrieve goldencopy parent and child records associated by a relationship. The table mct_34299 corresponds to the parent repository and the table mct_34255 corresponds to the child repository.
select prod.*, attr.*
from mct_34299 attr,
goldencopy gc2,
relationship rel,
goldencopy gc,
mct_34255 prod
where 1=1
and gc2.productkey = attr.cproductkeyid(+)
and gc2.version = attr.cmodversion(+)
and rel.childid = gc2.productkey(+)
and rel.parentid(+) = prod.cproductkeyid
and (select count(*)
from relationship rel2
where rel.childid = rel2.childid and rel.parentid = rel2.parentid
and rel2.moddate > rel.moddate
) = 0
and rel.active(+) = 'Y'
and gc.productkey = prod.cproductkeyid
and gc.version = prod.cmodversion