Hi everyone!
This is my very first question(the applause is heard).
The following query is not processing or taking more than 30 minutes which is my limit. Is the nested SELECT the issue?
SELECT DISTINCT
IM2_InventoryItemWhseDetl."ItemNumber", IM2_InventoryItemWhseDetl."WhseCode", IM2_InventoryItemWhseDetl."ReorderPointQty", IM2_InventoryItemWhseDetl."QtyOnHand", IM2_InventoryItemWhseDetl."QtyOnPurchhaseOrder", IM2_InventoryItemWhseDetl."QtyOnSalesOrder", IM2_InventoryItemWhseDetl."QtyOnBackOrder", IM2_InventoryItemWhseDetl."AveCost", IM2_InventoryItemWhseDetl."QtyOnWO", IM2_InventoryItemWhseDetl."QtyRequiredForWO",
IM1_InventoryMasterfile."ItemDescription", IM1_InventoryMasterfile."ProductLine", IM1_InventoryMasterfile."ProductType", IM1_InventoryMasterfile."StdUM", IM1_InventoryMasterfile."PrimaryVendorDivision", IM1_InventoryMasterfile."PrimaryVendorNumber", IM1_InventoryMasterfile."InventoryCycle", IM1_InventoryMasterfile."AveCost",
IM0_ParameterRecord."IncludePOOrWOInQtyAvailable",
SY0_CompanyParameters."CompanyName"
FROM
"IM0_ParameterRecord" IM0_ParameterRecord, "SY0_CompanyParameters" SY0_CompanyParameters, { oj "IM2_InventoryItemWhseDetl" IM2_InventoryItemWhseDetl LEFT OUTER JOIN "IM1_InventoryMasterfile" IM1_InventoryMasterfile ON IM2_InventoryItemWhseDetl."ItemNumber" = IM1_InventoryMasterfile."ItemNumber"}
WHERE
IM2_InventoryItemWhseDetl."BinLocation" <> IM0_ParameterRecord."IMApplicationCode" AND IM2_InventoryItemWhseDetl."ItemNumber" IN (SELECT a.ItemNumber FROM IM2_InventoryItemWhseDetl a WHERE a.WhseCode = '000')
ORDER BY
IM2_InventoryItemWhseDetl."ItemNumber" ASC
Thank you
JForsythe
This is my very first question(the applause is heard).
The following query is not processing or taking more than 30 minutes which is my limit. Is the nested SELECT the issue?
SELECT DISTINCT
IM2_InventoryItemWhseDetl."ItemNumber", IM2_InventoryItemWhseDetl."WhseCode", IM2_InventoryItemWhseDetl."ReorderPointQty", IM2_InventoryItemWhseDetl."QtyOnHand", IM2_InventoryItemWhseDetl."QtyOnPurchhaseOrder", IM2_InventoryItemWhseDetl."QtyOnSalesOrder", IM2_InventoryItemWhseDetl."QtyOnBackOrder", IM2_InventoryItemWhseDetl."AveCost", IM2_InventoryItemWhseDetl."QtyOnWO", IM2_InventoryItemWhseDetl."QtyRequiredForWO",
IM1_InventoryMasterfile."ItemDescription", IM1_InventoryMasterfile."ProductLine", IM1_InventoryMasterfile."ProductType", IM1_InventoryMasterfile."StdUM", IM1_InventoryMasterfile."PrimaryVendorDivision", IM1_InventoryMasterfile."PrimaryVendorNumber", IM1_InventoryMasterfile."InventoryCycle", IM1_InventoryMasterfile."AveCost",
IM0_ParameterRecord."IncludePOOrWOInQtyAvailable",
SY0_CompanyParameters."CompanyName"
FROM
"IM0_ParameterRecord" IM0_ParameterRecord, "SY0_CompanyParameters" SY0_CompanyParameters, { oj "IM2_InventoryItemWhseDetl" IM2_InventoryItemWhseDetl LEFT OUTER JOIN "IM1_InventoryMasterfile" IM1_InventoryMasterfile ON IM2_InventoryItemWhseDetl."ItemNumber" = IM1_InventoryMasterfile."ItemNumber"}
WHERE
IM2_InventoryItemWhseDetl."BinLocation" <> IM0_ParameterRecord."IMApplicationCode" AND IM2_InventoryItemWhseDetl."ItemNumber" IN (SELECT a.ItemNumber FROM IM2_InventoryItemWhseDetl a WHERE a.WhseCode = '000')
ORDER BY
IM2_InventoryItemWhseDetl."ItemNumber" ASC
Thank you
JForsythe