Hello All,
I just want the BAQ to show company, destination due date PO number part the line the release and the qty however as you can see in the example its multiplied it all please let me know where im going wrong
/*
- Disclaimer!!!
- This is not a real query being executed, but a simplified version for general vision.
- Executing it with any other tool may produce a different result.
*/select
[ContainerHeader].[Company] as [ContainerHeader_Company],
[ContainerHeader].[Destination_c] as [ContainerHeader_Destination_c],
[POHeader].[DueDate] as [POHeader_DueDate],
[PODetail].[PONUM] as [PODetail_PONUM],
[PODetail].[PartNum] as [PODetail_PartNum],
[PODetail].[POLine] as [PODetail_POLine],
[PODetail].[OrderQty] as [PODetail_OrderQty],
[PORel].[PORelNum] as [PORel_PORelNum]
from Erp.ContainerHeader as ContainerHeader
inner join Erp.ContainerDetail as ContainerDetail on
ContainerHeader.Company = ContainerDetail.Company
and ContainerHeader.ContainerID = ContainerDetail.ContainerID
inner join Erp.POHeader as POHeader on
ContainerDetail.Company = POHeader.Company
and ContainerDetail.PONum = POHeader.PONum
inner join Erp.PODetail as PODetail on
POHeader.Company = PODetail.Company
and POHeader.PONum = PODetail.PONUM
and ( PODetail.OpenLine = TRUE )
inner join Erp.PORel as PORel on
PODetail.Company = PORel.Company
and PODetail.PONUM = PORel.PONum
and PODetail.POLine = PORel.POLine