Important Note: It is possible that Inventory Item has multiple Manufacturer and Part Number, With respect to your business need you can fetch any No. of Manufacturer details from below query using rec_order value.
select
(SELECT manufacturer_name
FROM ( SELECT hp.party_name manufacturer_name,
a.tp_item_number manfr_part_num,
a.tp_item_desc description,
eirb.inventory_item_id,
eirb.creation_date,
ROWNUM rec_order
FROM egp_trading_partner_items a,
hz_parties hp,
egp_item_relationships_b eirb
WHERE a.tp_type = 'MANUFACTURER'
AND hp.party_id = a.trading_partner_id
AND a.tp_item_id = eirb.tp_item_id
AND eirb.item_relationship_type = 'MFG_PART_NUM'
AND eirb.inventory_item_id = esib.inventory_item_id ---300000001940364
ORDER BY eirb.creation_date ASC)
WHERE rec_order = 1)
MANUFACTURER_NAME,
(SELECT manfr_part_num
FROM ( SELECT hp.party_name manufacturer_name,
a.tp_item_number manfr_part_num,
a.tp_item_desc description,
eirb.inventory_item_id,
eirb.creation_date,
ROWNUM rec_order
FROM egp_trading_partner_items a,
hz_parties hp,
egp_item_relationships_b eirb
WHERE a.tp_type = 'MANUFACTURER'
AND hp.party_id = a.trading_partner_id
AND a.tp_item_id = eirb.tp_item_id
AND eirb.item_relationship_type = 'MFG_PART_NUM'
AND eirb.inventory_item_id = esib.inventory_item_id ---300000001940364
ORDER BY eirb.creation_date ASC)
WHERE rec_order = 1)
MANUFACTURER_PART_NUM
from FROM egp_system_items_b esib
Nice..
ReplyDeleteThanks :)
DeleteNice, thanks for sharing useful information.
ReplyDelete