Question
SQL - How to get wtpartmaster.ida2a2 and wtpart.idA2A2 from a WTPart.Partnumber?
How to select the wtpartmaster.ida2a2 and wtpart.idA2A2 from a given WTP Partnumber?
I would like to provide only the WTPart Partnumber to enable the usage of the following query (using the latest version-iteration of the provided WTPart). This query is going to provide the EPMDoc association to a WTPart:
SELECT
epmdocument.branchiditerationinfo,
epmbuildrule.branchida3a5,
epmbuildrule.buildtype,
wtpartmaster.wtpartnumber,
epmdocumentmaster.documentnumber
FROM epmbuildrule, epmdocument, epmdocumentmaster, wtpart, wtpartmaster, epmBuildHistory
WHERE
((epmbuildrule.branchida3a5 = epmdocument.branchiditerationinfo)
AND (epmdocument.ida3masterreference = epmdocumentmaster.ida2a2)
AND (wtpart.branchiditerationinfo = epmbuildrule.branchida3b5)
AND (wtpart.ida3masterreference = wtpartmaster.ida2a2)
AND (epmBuildHistory.idA3B5 = wtpart.idA2A2)
AND (epmBuildHistory.idA3A5 = epmdocument.idA2A2));

