Speeding up Replace Field Contents with ExecuteSQL

Discussion created by sabremm on Nov 20, 2018
Latest reply on Nov 21, 2018 by coherentkris

I have the following Replace Field Contents using ExecuteSQL in four consecutive steps using different parameters for date range.  I have 1000+ Products and this takes too much time; "Records remaining to update" pop up window comes up and it is basically one second per record.  Are there any suggestions as to how to speed the process? 


Replace Field Contents [ Items::Quantity; Replace with calculation:
ExecuteSQL ( "SELECT SUM (Quantity)
FROM Items as I JOIN POs as P ON P.\"_id_\" = I.\"_id_PO\" WHERE

Items.Description = ? AND Product.Customer = ? AND Product.State = ? AND Product.Date >= ? AND Product.Date <= ? " ;"" ; "" ; Items::Description; Product::Customer; Product::Date; theBegin ; theEnd ) )]