SET TALK OFF
SET SAFETY OFF
SET CENTURY ON
SET EXACT ON
SET DATE YMD
SET SYSMENU OFF
CLEAR ALL
CLOSE DATABASES
* CD D:\BDS
CREATE DBF L1 (A1 C(10), A2 C(10),A3 N(2)) &&建立表
FOR X=1 TO 8
Y=STR(X,1)
APPEND BLANK
REPLACE A1 WITH 'SJA'+Y,A2 WITH 'SJB'+Y,A3 WITH X
ENDFOR
LIST
COPY TO L2 FOR A3<6
INDEX ON A3 TAG A1
SELECT 0
USE L2
DELETE FOR A3=3
PACK
LIST
WAIT
INDEX ON A3 TAG A1
SELECT L1
SET RELATION TO A3 INTO L2
*UPDATE L1 SET L1.A1=L2.A2 from L2 WHERE L1.A3=L2.A3 &&此命令在9.0可以,8.0出错
* UPDATE L1 SET A1 = "u" + L2.A2 WHERE L1.A3=L2.A3
SELECT L1
&& by Tony
REPLACE ALL L1.A1 WITH "U"+L2.A2 FOR L1.A3=L2.A3
&&此命令在更改关联方法后也不能达到预想的目的
BROWSE
RETURN