以下是引用bccn0906在2013-11-27 13:44:39的发言:
Use WX In 0
Use CY2 In 0
SELECT CY2
SCAN
CALCULATE MIN(Random) TO Random_TMP FOR hydl=CY2.hydl And fc=CY2.fc And Not(bZ2=='1') IN WX
SELECT WX
LOCATE FOR hydl=CY2.hydl And fc=CY2.fc And Not(bZ2=='1') AND Random=Random_TMP
If Found()
Replace bZ2 With '1' In WX
Replace WIGHT0 With WX.WEIGHT,NH0 With WX.NH0,code10 With WX.code10,NH10 With WX.Nhl In CY2
Else
=Messagebox('错误',64,'提示')
Endif
Select CY2
Endscan
Close Databases
谢谢,下午开会,明天试试看
Use WX In 0
Use CY2 In 0
SELECT CY2
SCAN
CALCULATE MIN(Random) TO Random_TMP FOR hydl=CY2.hydl And fc=CY2.fc And Not(bZ2=='1') IN WX
SELECT WX
LOCATE FOR hydl=CY2.hydl And fc=CY2.fc And Not(bZ2=='1') AND Random=Random_TMP
If Found()
Replace bZ2 With '1' In WX
Replace WIGHT0 With WX.WEIGHT,NH0 With WX.NH0,code10 With WX.code10,NH10 With WX.Nhl In CY2
Else
=Messagebox('错误',64,'提示')
Endif
Select CY2
Endscan
Close Databases