*JCJB* 10/26/2005 - Iterate the Min/Max cursor. SELECT c_MinMax SCAN *JCJB* 10/26/2005 - Update the Min Values of the Unlocked Stores in this Group. IF c_MinMax.nMin > -1 REPLACE c_Store.nMin WITH c_MinMax.nMin ; ALL FOR c_Store.cGroup = c_MinMax.cGroup ; AND !c_Store.lLock IN c_Store ENDIF *JCJB* 10/26/2005 - Update the Max Values of the Unlocked Stores in this Group. IF c_MinMax.nMax > -1 REPLACE c_Store.nMax WITH c_MinMax.nMax ; ALL FOR c_Store.cGroup = c_MinMax.cGroup ; AND !c_Store.lLock IN c_Store ENDIF ENDSCANObviously, this way isn't as clean as a single UPDATE, but it is working ... and if ain't broke ...
UPDATE c_Store SET ; > c_Store.nMin = c_MinMax.nMin ; > FROM c_Store ; > JOIN c_MinMax WITH (Buffering = .t.) ; > ON c_Store.cGroup = c_MinMax.cGroup ; > WHERE ; > c_Store.lLock = .f. ; > AND c_MinMax.nMin > -1 >>