O
oedev
Guest
Re-structure the query as follows, probably faster in running as well. Hopefully you'll have an index on the Hide_From_GST_Report field? cust-blk: FOR EACH Customer NO-LOCK WHERE NOT Customer.Hide_From_GST_Report: DISPLAY Customer.Customer_ID. /* do any first-of customer logic here */ inv-blk: FOR EACH InvHeader_DT NO-LOCK WHERE InvHeader_DT.Customer = Customer.Customer_ID AND InvHeader_DT.Store_ID = 1 AND InvHeader_DT.Invoice_Date >= 11/01/2017 AND InvHeader_DT.Invoice_Date <= 11/30/2017: END. END.
Continue reading...
Continue reading...