How to get manufacturer table data for an Affected Item for a particular change using SQL
How to get the MPN, manufacturer tab data of a affected item from a change order using SQL.
It should only include the Manyfacturer data of that change order.
I tried using Manu_By , Manu_parts, manufacturers, Change , Rev, and Item table but the result data seems to be incorrect. It’s including the manufacturer data of prev rev as well. Is there a way to get only those manuf data which are redlined Add and unchanges rows for that affcted ite,..?
AML data starts with the MANU_BY table. AGILE_PART is the ID of the item. MANU_PART is the ID of the manufacturer part number in MANU_PART, where MANU_ID is the ID of the manufacturer for the part (MANUFACTURERS).
The CHANGE_IN/CHANGE_OUT is a bit complicated, but it works as follows : to get the data for a given revision, get the change IDs for the revision you are interested in and all previously released revisions (in this case, both ECO and MCO changes). Then look for any row in MANU_BY where CHANGE_IN is zero or is equal to one of that set of change IDs, and where CHANGE_OUT is zero or not in the set of change IDs. This will give you all AML records that were active as of the latest revision in the set.