Using Epicor System Version 11.2.400.11 UX Platform Version 10.1.64
I’ve created a custom BAQ. I’m trying to run an Inventory report using 3 tables. Table 1 = PartLot, Table 2 = Part, Table 3 = PartBin.
I need the following fields returned: Class ID, IUM, PN, ProdCode, TypeCode, OnhandQty, LotNum, ExpirationDate, WarehouseCode.
My query results return duplicate records for PN (part number) field every time no matter how I change the JOINS. Is it because Part Number also = unique identifier??
The relationship between the tables is Company and PartNum.
It becomes a bit confusing to me when joining more than two tables.
I tried using select DISTINCT but that did not work., I even tried DISTINCT at the Table Criteria level. did not work either.
Here’s my Query Phrase & Results. Any help in how to run this correctly is GREATLY appreciated. Thank You!
select
[Part].[ClassID] as [Part_ClassID],
[Part].[IUM] as [Part_IUM],
[Part].[PartNum] as [Part_PartNum],
[Part].[ProdCode] as [Part_ProdCode],
[Part].[TypeCode] as [Part_TypeCode],
[PartLot].[LotNum] as [PartLot_LotNum],
[PartLot].[ExpirationDate] as [PartLot_ExpirationDate],
[PartWhse].[WarehouseCode] as [PartWhse_WarehouseCode]
from Erp.PartLot as [PartLot]
left outer join Erp.Part as [Part] on
PartLot.Company = Part.Company
and PartLot.PartNum = Part.PartNum
inner join Erp.PartWhse as [PartWhse] on
Part.Company = PartWhse.Company
and Part.PartNum = PartWhse.PartNum
order by Part.PartNum