Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
With the below query , it is extracting EPMReferencelink for all the revision of refence object, how to extract only for correct reference part which as stored configuration
distinct m.documentNumber AS parent,
m1.documentNumber AS child,
p1.CLASSNAMEKEYCONTAINERREFEREN,
p.versionIdA2versionInfo AS parentrevision,
p.iterationIdA2iterationInfo AS parentiteration,
p1.versionIdA2versionInfo AS childrevision,
p1.iterationIdA2iterationInfo AS childiteration,
l.*
-- pro.namecontainerInfo AS parentnamecontainerinfo,
-- pro1.namecontainerInfo AS childnamecontainerinfo
FROM
wind.EPMReferenceLink l,
wind.EPMDocument p,
wind.EPMDocument p1,
wind.EPMDocumentMaster m,
wind.EPMDocumentMaster m1,
wind.PDMLinkProduct pro
--wind.PDMLinkProduct pro1
-- wind.WTLibrary lb
--wind.WTLibrary lb1
WHERE
l.idA3A5 = p.idA2A2
AND p.idA3masterReference = m.idA2A2
AND p.idA3containerReference = pro.idA2A2
--AND p1.idA3containerReference = pro1.idA2A2
--AND m.idA3containerReference= lb.idA2A2
-- AND m1.idA3containerReference = lb.idA2A2
--AND pro.namecontainerInfo IN ('SPare-Parts')
--AND pro1.namecontainerInfo = 'Stapling'
AND l.idA3B5 = m1.idA2A2
AND p1.idA3masterReference = m1.idA2A2
AND m1.documentNumber IN (select CHILD from EPMREF_DISTINCTCHILD)
ORDER BY
parent, child;
'as stored configuration' is a filer used to resolve the master children to a given version .
There is no way to apply any filer logic in SQL (only maybe for latest we can use max on revision/iteration )